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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:1170:    ref_push_string( tmp );    push_int( 256 );    push_object( clone_object( bignum_program, 2 ) );    if( tmp->str[0]&0x80 )    o_xor();    free_string( tmp );    }       PIKEFUN int(0..) _size_object( )    { -  RETURN THIS->malloced ? THIS->allocated : 0; +  Buffer *io = THIS; +  if (io->malloced) +  { +  push_ulongest(THIS->allocated);    } -  +  else +  { +  push_int(0); +  } +  }       /*! @decl Buffer add_padding( int(0..) nbytes, int(0..255)|void byte )    *!    *! Add @[nbytes] bytes of padding, if @[byte] is not specified the    *! area will be filled with 0's, otherwise the specified byte will    *! be repeated.    */    PIKEFUN Buffer add_padding( int(0..) nbytes, int|void _byte )    {    Buffer *io = THIS;
pike.git/src/modules/_Stdio/buffer.cmod:1555:    }       /*! @decl int _sizeof()    *!    *! Returns the buffer size, in bytes.    *! This is how much you can read from the buffer until it runs out of data.    */    PIKEFUN int(0..) _sizeof()    flags ID_PROTECTED;    { -  push_int64(io_len(THIS)); +  push_ulongest(io_len(THIS));    }       /*! @decl string cast(string type)    *!    *! Convert the buffer to a string.    *!    *!@note    *! This only works for buffers whose length is less than 0x7fffffff.    */    PIKEFUN string(8bit) cast(string to)