pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4573: Inside #if defined(WITH_FACETS)
   else {    Pike_compiler->new_program->flags |= PROGRAM_IS_PRODUCT;    add_ref(p->facet_group);    Pike_compiler->new_program->facet_group = p->facet_group;    }    }   }   #endif       - /* -  * make this program inherit another program -  */ - PMOD_EXPORT void low_inherit(struct program *p, + static void lower_inherit(struct program *p,    struct object *parent,    int parent_identifier,    int parent_offset,    INT32 flags,    struct pike_string *name)   {    int e;    ptrdiff_t inherit_offset, storage_offset;    struct inherit inherit;   
pike.git/src/program.c:4850:    if(fun.id_flags & ID_PRIVATE) fun.id_flags|=ID_HIDDEN;       if (fun.id_flags & ID_PUBLIC)    fun.id_flags |= flags & ~ID_PRIVATE;    else    fun.id_flags |= flags;       fun.id_flags |= ID_INHERITED;    add_to_identifier_references(fun);    } + }    -  + /* +  * make this program inherit another program +  */ + 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) {    if (p->flags & (PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT)) {    /* We'll need the parent pointer as well... */    struct program_state *state = Pike_compiler;    -  while (state && parent_offset--) { +  /* 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;    }    }    }   }      PMOD_EXPORT void do_inherit(struct svalue *s,    INT32 flags,    struct pike_string *name)