pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2019-04-08
2019-04-08 07:42:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>
7b0ef3f2eb14cf351ed9cdedcaadada4b5dd4b75 (
27
lines) (+
27
/-
0
)
[
Show
|
Annotate
]
Branch:
master
Runtime: Added {inhibit,permit}_destruct().
2535:
} }
+
/**
+
* Inhibit explicit destruction of this object.
+
*
+
* @param inh Inherit level for the inherit of InhibitDestruct
+
* in the current program.
+
*/
+
PMOD_EXPORT void inhibit_destruct(int inh)
+
{
+
apply_current(Pike_fp->current_program->inherits[inh].identifier_level +
+
f_InhibitDestruct_inhibit_destruct_fun_num, 0);
+
pop_stack();
+
}
+
/*! @decl void permit_destruct() *! *! Allow explicit destruction of this object again.
2563:
} }
+
/**
+
* Allow explicit destruction of this object again.
+
*
+
* @param inh Inherit level for the inherit of InhibitDestruct
+
* in the current program.
+
*/
+
PMOD_EXPORT void permit_destruct(int inh)
+
{
+
apply_current(Pike_fp->current_program->inherits[inh].identifier_level +
+
f_InhibitDestruct_permit_destruct_fun_num, 0);
+
pop_stack();
+
}
+
/*! @decl int(0..1) _destruct(int|void reason) *! *! Returns @expr{1@} when @[inhibit_destruct()] has been