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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:125:       static void io_ensure_unlocked(Buffer *io)    {    if( io->locked )    io_was_locked( );    }       static void io_trim( Buffer *io )    ATTRIBUTE((noinline));    -  static INT_TYPE io_consume( Buffer *io, int num ) +  static INT_TYPE io_consume( Buffer *io, ptrdiff_t num )    {    io->offset += num;    if( UNLIKELY(io->allocated > (io_len(io) * io->max_waste)) )    io_trim(io);    return io_len(io);    }       static unsigned char *io_read_pointer(Buffer *io)    {    return io->buffer + io->offset;
pike.git/src/modules/_Stdio/buffer.cmod:1946:    *!    *! @note    *! Unless whitespaces are required this function only really work correctly    *! with objects, arrays and strings.    *!    *! There is really no way to see where one value starts and the other ends    *! for most other cases    */    PIKEFUN mixed read_json(int|void require_whitespace)    { -  int stop, whites = 0; +  INT_TYPES whites = 0; +  ptrdiff_t stop;    static ptrdiff_t(*parse_json_pcharp)(PCHARP,size_t,int,char**);    char *err = NULL;    if( require_whitespace )    whites = require_whitespace->u.integer;       Pike_sp-=args;    if( !parse_json_pcharp )    parse_json_pcharp = PIKE_MODULE_IMPORT(Standards.JSON, parse_json_pcharp );    retry:    stop = parse_json_pcharp( MKPCHARP(io_read_pointer(THIS),0),