pike.git / lib / modules / SSL.pmod / Buffer.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Buffer.pike:9:   this_program add_hstring(string(8bit)|Stdio.Buffer str, int sz)   {    return [object(this_program)]::add_hstring(str,sz);   }      this_program add_int(int i, int sz)   {    return [object(this_program)]::add_int(i,sz);   }    + this_program add(string(8bit)|Stdio.Buffer str) + { +  return [object(this_program)]::add(str); + } +    //! Create a new buffer, optionally initialized with the   //! value @[s]. - void create(void|string(0..255) s) + void create(void|string(8bit) s)   {    if( s && strlen(s) )    ::create(s);    else    ::create();    set_error_mode(.BufferError);   }    - //! Adds the data @[s] verbatim to the end of the buffer. - this_program add_data(string(0..255) s) - { -  return [object(this_program)]add(s); - } -  +    //! Appends a bignum @[i] as a variable string preceded with an   //! unsigned integer of the size @[len_width] declaring the length   //! of the string. @[len_width] defaults to 2.   this_program put_bignum(Gmp.mpz i, int(0..)|void len_width)   {    return [object(this_program)]add_hstring(i->digits(256),len_width||2);   }    - //! Appends the fix sized string @[s] to the buffer. - this_program put_fix_string(string(0..255) s) - { -  return [object(this_program)]add(s); - } -  +    //! Appends an array of unsigned integers of width @[item_size]   //! to the buffer.   this_program put_fix_uint_array(array(int) data, int(0..) item_size)   {    return [object(this_program)]add_ints(data,item_size);   }      //! Appends an array of unsigned integers of width @[item_size]   //! to the buffer, preceded with an unsigned integer @[len] declaring   //! the size of the array in bytes.