pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:4994:    while (state && (state->new_program->id != n->u.integer.a)) {    state = state->previous;    offset++;    }    if (!state) {    yyerror("Failed to resolv external constant.\n");    return;    }    p = state->new_program;    numid = n->u.integer.b; +  if ((name == this_program_string) && (offset == 1)) { +  /* Klugde: Default to renaming ::this_program +  * to the name of the current class. +  * +  * Otherwise the this_program:-scope +  * will become confusing, as it will +  * refer to the inherit and not the +  * current class. +  */ +  name = ID_FROM_INT(p, numid)->name;    } -  +  }       continue_inherit:       /* FIXME: Support external constants. */    if(numid != IDREF_MAGIC_THIS &&    (IDENTIFIER_IS_CONSTANT((i=ID_FROM_INT(p, numid))->    identifier_flags)) &&    (i->func.const_info.offset != -1))    {    struct svalue *s=&PROG_FROM_INT(p, numid)->