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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:2878:    THIS->rewind_to = THIS->io->offset;    }       EXIT {    if( THIS->io && THIS->obj->prog )    THIS->io->locked_move--;    free_object( THIS->obj );    }       PIKEFUN void _destruct( int reason ) -  flags ID_PRIVATE; +  flags ID_PROTECTED;    {    if( reason > 1 && THIS->auto_mode ) /* no refs or gc */    {    if( THIS->io && THIS->obj->prog )    THIS->io->offset = THIS->rewind_to;    }    }       /*! @decl void rewind()    *! Rewinds the buffer explicitly.    *! @note    *! Destructs this @[RewindKey]    */    PIKEFUN void rewind() {    THIS->auto_mode = 1;    destruct_object(Pike_fp->current_object, DESTRUCT_GC);    }       PIKEFUN void create() -  flags ID_PRIVATE; +  flags ID_PROTECTED;    {    /* FIXME: The following zeroing isn't safe! */    THIS->obj = 0;    THIS->io = 0;    Pike_error("Not supported\n");    }    }       /*! @endclass RewindKey    */