pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:2519:       /*! @decl void inhibit_destruct()    *!    *! Inhibit explicit destruction of this object.    *!    *! @seealso    *! @[permit_destruct()], @[_destruct()],    *! @[destruct()], @[lfun::_destruct()]    */    PIKEFUN void inhibit_destruct() -  flags ID_PROTECTED; +  flags ID_PROTECTED|ID_LOCAL;    {    if (UNLIKELY(THIS->lock_count < 0)) {    THIS->lock_count--;    } else {    THIS->lock_count++;    }    }       /*! @decl void permit_destruct()    *!    *! Allow explicit destruction of this object again.    *!    *! @seealso    *! @[inhibit_destruct()], @[_destruct()],    *! @[destruct()], @[lfun::_destruct()]    */    PIKEFUN void permit_destruct() -  flags ID_PROTECTED; +  flags ID_PROTECTED|ID_LOCAL;    {    if (!THIS->lock_count) {    Pike_error("permit_destruct() without inhibit.\n");    }    if (UNLIKELY(THIS->lock_count < 0)) {    /* destruct() has been called on the object. */    if (UNLIKELY(!++THIS->lock_count)) {    /* No inhibits remaining.    *    * Time to die.
pike.git/src/builtin.cmod:2566:    /*! @decl int(0..1) _destruct(int|void reason)    *!    *! Returns @expr{1@} when @[inhibit_destruct()] has been    *! called more times than @[permit_destruct()].    *!    *! @seealso    *! @[inhibit_destruct()], @[permit_destruct()],    *! @[destruct()], @[lfun::_destruct()]    */    PIKEFUN int(0..1) _destruct(int|void reason) -  flags ID_PROTECTED; +  flags ID_PROTECTED|ID_LOCAL;    {    if (THIS->lock_count > 0) {    THIS->lock_count = -THIS->lock_count;    }    push_int(!!THIS->lock_count);    }   };      /*! @endclass    */