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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.h:7:       struct object *sub, *source, *this;    struct program *error_mode;    struct svalue output;    struct pike_string *str;          INT_TYPE num_malloc, num_move; /* debug mainly, for testsuite*/    INT32 locked, locked_move;    float max_waste; -  char malloced, output_triggered; +  char malloced;   };      struct rewind_to {    struct _Buffer *io;    size_t rewind_to;   #ifdef PIKE_DEBUG    int old_locked_move;   #endif   };      typedef struct _Buffer Buffer;      extern void init_stdio_buffer(void);   extern void exit_stdio_buffer(void);      PMOD_EXPORT void io_ensure_malloced( Buffer *io, size_t bytes );   PMOD_EXPORT unsigned char *io_add_space_do_something( Buffer *io, size_t bytes, int force );   PMOD_EXPORT Buffer *io_buffer_from_object(struct object *o);   PMOD_EXPORT void io_trim( Buffer *io ); - PMOD_EXPORT ptrdiff_t io_actually_trigger_output( Buffer *io ); + PMOD_EXPORT void io_actually_trigger_output( Buffer *io );      PIKE_UNUSED_ATTRIBUTE   static size_t io_len( Buffer *io )   {    return io->len-io->offset;   }      PIKE_UNUSED_ATTRIBUTE   static unsigned char *io_read_pointer(Buffer *io)   {
pike.git/src/modules/_Stdio/buffer.h:60:   }      PIKE_UNUSED_ATTRIBUTE   static INT_TYPE io_consume( Buffer *io, ptrdiff_t num )   {    io->offset += num;    return io_len(io);   }      PIKE_UNUSED_ATTRIBUTE - static ptrdiff_t io_trigger_output( Buffer *io ) + static void io_trigger_output( Buffer *io )   { -  if( UNLIKELY(io->output.u.object) && UNLIKELY(!io->output_triggered) ) -  return io_actually_trigger_output(io); -  return 0; +  if( UNLIKELY(io->output.u.object) ) +  io_actually_trigger_output(io);   }