pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4762:    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);    } +  +  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--) { +  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)   {    struct object *parent_obj = NULL;    int parent_id = -1;    struct program *p = low_program_from_svalue(s, &parent_obj, &parent_id);    low_inherit(p, parent_obj, parent_id, 0, flags, name);   }
pike.git/src/program.c:4835:    do_inherit(s,flags,name);    return;    }else{    low_inherit(s->u.program,    0,    numid,    offset+42,    flags,    name);    } -  if (n->token == F_EXTERNAL) { -  struct program *p=program_from_svalue(s); -  if (p->flags & (PROGRAM_NEEDS_PARENT|PROGRAM_NEEDS_PARENT)) { -  /* We'll need the parent pointer as well... */ -  struct program_state *state = Pike_compiler; -  -  while (state && (state->new_program->id != n->u.integer.a)) { -  state->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT; -  state = state->previous; -  } -  } -  } +     }else{    yyerror("Inherit identifier is not a constant program");    return;    }    break;       default:    resolv_class(n);    do_inherit(Pike_sp-1, flags, name);    pop_stack();