pike.git / src / modules / _Stdio / buffer.cmod

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:448:    return l;    }    return -1;    }       PMOD_EXPORT void io_actually_trigger_output( Buffer *io )    ATTRIBUTE((noclone,noinline));       PMOD_EXPORT void io_actually_trigger_output( Buffer *io )    { -  if (PIKE_TYPEOF(io->output) == PIKE_T_FUNCTION) { +  if (io->output.tu.named_type == PIKE_T_FUNCTION) {    if (UNLIKELY(!io->output.u.object->prog)) {    /* Destructed object. */    free_svalue(&io->output);    return;    }       move_svalue(Pike_sp++, &io->output);    apply_svalue(Pike_sp-1, 0);    pop_n_elems(2);    }
pike.git/src/modules/_Stdio/buffer.cmod:987:    *! of File or Stream like programs. Do not use this yourself    *! on buffers with Files or Streams in buffer modes.    */    PIKEFUN void __set_on_write( zero|function f )    {    Buffer *io = CHECK_DESTRUCTED(THIS);       if (f)    assign_svalue(&io->output, f);    else { -  if (PIKE_TYPEOF(io->output) == PIKE_T_FUNCTION) +  if (io->output.tu.named_type == PIKE_T_FUNCTION)    free_svalue(&io->output);    }    }       /*! @decl int(-1..) output_to( Stdio.Stream|function(string(8bit):int) fun, @    *! int(0..)|void nbytes )    *!    *! Write data from the buffer to the indicated file.    *!    *! @param fun