pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4776:    */   PMOD_EXPORT void low_inherit(struct program *p,    struct object *parent,    int parent_identifier,    int parent_offset,    INT32 flags,    struct pike_string *name)   {    lower_inherit(p, parent, parent_identifier, parent_offset, flags, name);    -  if (parent_offset) { +  /* Don't do this for OBJECT_PARENT or INHERIT_PARENT inherits. +  * They may show up here from decode_value(). +  */ +  if (parent_offset >= 42) {    if (p->flags & (PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT)) {    /* We'll need the parent pointer as well... */    struct program_state *state = Pike_compiler;       /* parent offset was increased by 42 by the caller... */    parent_offset -= 42;       while (state && state->new_program && parent_offset--) {    state->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;    state = state->previous;