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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:319:    static void io_range_error_throw( Buffer *io, int howmuch )    ATTRIBUTE((noclone,noinline));       static void io_range_error_throw( Buffer *io, int howmuch )    {    if( io->error_mode )    {    struct object *err;    if( howmuch > 0 )    { -  push_text("Trying to read %d bytes outside allowed range\n"); +  push_static_text("Trying to read %d bytes outside allowed range\n");    push_int(howmuch);    f_sprintf(2);    }    else -  push_text("Illegal arguments\n"); +  push_static_text("Illegal arguments\n");       if( io->error_mode != buffer_error_program )    {    ref_push_object( io->this );    err = clone_object(io->error_mode,2);    }    else    err = clone_object(io->error_mode,1);       push_object(err);
pike.git/src/modules/_Stdio/buffer.cmod:1643:    PIKEFUN string(0..255) _sprintf(int o, mapping UNUSED)    flags ID_PROTECTED;    {    size_t bytes;    pop_n_elems(args-1);    Pike_sp--;    switch( o )    {    case 'O':    { -  push_text("%O(%d bytes, read=[..%d] data=[%d..%d] free=[%d..%d] %s%s)"); +  push_static_text("%O(%d bytes, read=[..%d] data=[%d..%d] free=[%d..%d] %s%s)");    ref_push_program(Pike_fp->current_object->prog);    /* io_len [..offset] [offset..len] [..allocated] */    push_int(io_len(THIS));    push_int(THIS->offset-1);    push_int(THIS->offset);       push_int(THIS->len-1);    push_int(THIS->len);    push_int(THIS->allocated); -  push_text( (THIS->str ? "string" : THIS->malloced ? "allocated" : "subbuffer" ) ); +  push_static_text( (THIS->str ? "string" : THIS->malloced ? "allocated" : "subbuffer" ) );    if( THIS->locked ) -  push_text(" (read only)"); +  push_static_text(" (read only)");    else -  push_text(""); +  push_static_text("");    f_sprintf(10);    }    break;       case 's':    bytes = io_len(THIS);    THIS->locked_move++;    push_string( io_read_string(THIS, bytes) );    io_rewind(THIS, bytes);    THIS->locked_move--;    break;       case 'q': -  push_text("%q"); +  push_static_text("%q");    bytes = io_len(THIS);    THIS->locked_move++;    push_string( io_read_string(THIS, bytes) );    io_rewind(THIS, bytes);    THIS->locked_move--;    f_sprintf(2);    break;    default:    push_undefined();    }