pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:12085:
Pike_sp-2, Pike_sp-1); } pop_n_elems(2); continue; } } END_CYCLIC(); }
-
PMOD_EXPORT void *parent_storage(int depth)
+
PMOD_EXPORT void *parent_storage(int depth
, struct program *expected
)
{ struct external_variable_context loc;
-
+
int i;
loc.o = Pike_fp->current_object; loc.parent_identifier = 0; loc.inherit = Pike_fp->context; find_external_context(&loc, depth); if (!loc.o->prog) Pike_error ("Cannot access storage of destructed parent object.\n");
-
+
for (i = 0; i < loc.inherit->prog->num_inherits; i++) {
+
if (loc.inherit[i].prog == expected) {
+
/* Found. */
+
loc.inherit += i;
+
break;
+
}
+
}
+
return loc.o->storage + loc.inherit->storage_offset; } PMOD_EXPORT void change_compiler_compatibility(int major, int minor) { CHECK_COMPILER(); push_int(major); push_int(minor);