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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:613:    Buffer *to;       if (UNLIKELY(!io_avail(io, len)))    return NULL;       b = fast_clone_object( Buffer_program );    to = io_buffer_from_object(b);       to->buffer = io_read_pointer(io);    to->len = len; +  to->error_mode = io->error_mode; +  if (to->error_mode) add_ref(to->error_mode);       io_consume( io, len );       if (UNLIKELY(do_copy))    io_ensure_malloced( to, headroom );    else {    Buffer *parent = io;    switch (to->sourcetype = io->sourcetype) {    case PIKE_T_STRING:    add_ref(to->source.str = io->source.str);
pike.git/src/modules/_Stdio/buffer.cmod:2923:       INIT {    Buffer *this = THIS;    this->max_waste = 0.615;    this->this = THIS_OBJECT;    }       EXIT {    Buffer *this = THIS;    io_unlink_external_storage( this ); -  if( this->error_mode ) +  if( this->error_mode ) {    free_program( this->error_mode ); -  +  this->error_mode = NULL; +  }    if( this->allocated )    free( this->buffer );    }         /*! @class RewindKey    *!    *! The return value of @[Buffer.rewind_on_error()] and    *! @[Buffer.rewind_key()]    *!