pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:7868:    Pike_error("Lookup of identifier %s in destructed object.\n", name);    } else {    Pike_error("Lookup of long identifier in destructed object.\n");    }    }    n=findstring(name);    if(!n) return -1;    return find_shared_string_identifier(n,prog);   }    + PMOD_EXPORT int find_identifier_inh(const char *name, +  const struct program *prog, +  int inh) + { +  struct pike_string *n; +  int f; +  +  if(!prog) { +  if (strlen(name) < 1024) { +  Pike_error("Lookup of identifier %s in destructed object.\n", name); +  } else { +  Pike_error("Lookup of long identifier in destructed object.\n"); +  } +  } +  if (prog->num_inherits <= inh) { +  Pike_error("Lookup of identifier in invalid inherit.\n"); +  } +  n=findstring(name); +  if(!n) return -1; +  f = find_shared_string_identifier(n, prog->inherits[inh].prog); +  if (f != -1) f += prog->inherits[inh].identifier_level; +  return f; + } +    int store_prog_string(struct pike_string *str)   {    unsigned int i;    if( str->refs > 1 )    for (i=0;i<Pike_compiler->new_program->num_strings;i++)    if (Pike_compiler->new_program->strings[i] == str)    return i;       reference_shared_string(str);    add_to_strings(str);