pike.git / lib / modules / ADT.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/ADT.pmod/module.pmod:141:    //! Get the remaining data from the buffer and clears the buffer.    string get_rest()    {    string s = buffer[index..];    create();    return s;    }       //! Reads an array of integers as written by @[put_fix_uint_array]    //! from the buffer. -  array(mixed) get_fix_uint_array(int item_size, int size) +  array(int) get_fix_uint_array(int item_size, int size)    { -  array(mixed) res = allocate(size); +  array(int) res = allocate(size);    for(int i = 0; i<size; i++)    res[i] = get_uint(item_size);    return res;    }       //! Reads an array of integers as written by @[put_var_uint_array]    //! from the buffer. -  array(mixed) get_var_uint_array(int item_size, int len) +  array(int) get_var_uint_array(int item_size, int len)    {    return get_fix_uint_array(item_size, get_uint(len));    }       //! Returns one of there is any more data to read.    int(0..1) is_empty()    {    return (index == sizeof(buffer));    }   }