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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:52:    *! filedescriptors if so desired. This eliminates at least one memory    *! copy.    *!    *! @note    *! The "avoid copy" part means that a IOBuffer will never shrink    *! unless you call the @[trim] function.    *!    */   PIKECLASS IOBuffer   { -  CVAR IOBuffer b; -  +    #if PRECOMPILE_API_VERSION > 5    PIKEVAR int b.num_malloc;    PIKEVAR int b.num_move;   #endif    -  +  CVAR IOBuffer b; +     static void io_set_error_mode( IOBuffer *io, struct program *m )    {    if( m ) m->refs++;    if( io->error_mode ) free_program( io->error_mode );    io->error_mode = m;    }       static size_t io_len( IOBuffer *io )    {    return io->len-io->offset;