pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:12143:    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;    }    }    + #ifdef PIKE_DEBUG +  if (loc.inherit->prog != expected) { +  Pike_fatal("Failed to find expected parent storage.\n"); +  } + #endif +     return loc.o->storage + loc.inherit->storage_offset;   }    -  + PMOD_EXPORT void *get_inherited_storage(int inh, struct program *expected) + { +  struct inherit *i = Pike_fp->context + inh; +  + #ifdef PIKE_DEBUG +  struct program *p = Pike_fp->current_program; +  if (i >= (p->inherits + p->num_inherits)) { +  Pike_fatal("Inherit out of range!\n"); +  } +  if (i->prog != expected) { +  Pike_fatal("Unexpected program at inherit #%d!\n", inh); +  } + #endif +  +  return Pike_fp->current_object->storage + i->storage_offset; + } +    PMOD_EXPORT void change_compiler_compatibility(int major, int minor)   {    CHECK_COMPILER();       push_int(major);    push_int(minor);       safe_apply_current2(PC_CHANGE_COMPILER_COMPATIBILITY_FUN_NUM, 2,    "change_compiler_compatibility");    pop_stack();