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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:983:    *! 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 = THIS;       if (f)    assign_svalue(&io->output, f);    else { -  if (io->output.u.object) +  if (io->output.u.object) {    free_svalue(&io->output); -  +  io->output.u.object = 0; // free_svalue() puts in -1 +  }    SET_SVAL(io->output, PIKE_T_INT, NUMBER_NUMBER, integer, 0);    }    }       /*! @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