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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:1563:    }       /*! @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(0..255) cast(string to) +  flags ID_PROTECTED;    {    if( to != literal_string_string )    {    push_undefined();    return;    }    if( io_len(THIS) > 0x7fffffff )    Pike_error("This buffer is too large to convert to a string.\n");    push_string(make_shared_binary_string((void*)io_read_pointer(THIS),    (INT32)io_len(THIS)));