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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:18:   #include "backend.h"   #include "fd_control.h"   #include "file_machine.h"   #include "file.h"   #include "whitespace.h"   #include "pike_types.h"   #include "pike_threadlib.h"   #include "buffer.h"   #include "module_support.h"   #include "bitvector.h" + #include "pike_search.h"      /* Includes <gmp.h> */   #include "bignum.h"   #include "sprintf.h"      #ifdef HAVE_ARPA_INET_H   #include <arpa/inet.h>   #endif /* HAVE_ARPA_INET_H */      #define DEFAULT_CMOD_STORAGE static
pike.git/src/modules/_Stdio/buffer.cmod:341:       static void io_do_rewind_on_error( struct rewind_to *e )    {    e->io->locked_move--;    e->io->offset = e->rewind_to;    free( e );    }       static void io_rewind_on_error( Buffer *io, ONERROR *x )    { -  struct rewind_to *rew = xalloc( sizeof( struct rewind_to ) ); +  struct rewind_to *rew = ALLOC_STRUCT( rewind_to );    io->locked_move++;   #if defined(PIKE_DEBUG)    rew->old_locked_move = io->locked_move;   #endif    rew->io = io;    rew->rewind_to = io->offset;    SET_ONERROR( (*x), io_do_rewind_on_error, rew );    }       static void io_unset_rewind_on_error( Buffer *io, ONERROR *x )
pike.git/src/modules/_Stdio/buffer.cmod:371:    }       static void io_do_unwrite_on_error( struct rewind_to *e )    {    e->io->len = e->rewind_to;    free( e );    }       static void io_unwrite_on_error( Buffer *io, ONERROR *x )    { -  struct rewind_to *rew = xalloc( sizeof( struct rewind_to ) ); +  struct rewind_to *rew = ALLOC_STRUCT( rewind_to );    rew->io = io;    rew->rewind_to = io->len;    SET_ONERROR( (*x), io_do_unwrite_on_error, rew );    }       static void io_unset_unwrite_on_error( Buffer *UNUSED(io), ONERROR *x )    {    UNSET_ONERROR( (*x) );    free( x->arg );    }