pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:4878:
if(p->identifier_references[i].id_flags & ID_HIDDEN) return -1; if(p->identifier_references[i].id_flags & ID_PRIVATE) if(!(flags & SEE_PRIVATE)) return -1; return really_low_reference_inherited_identifier(q, e, i); }
-
int find_inherit(struct program *p, struct pike_string *name)
+
int find_inherit(
const
struct program *p,
const
struct pike_string *name)
{ int e; int level = p->num_inherits; /* Larger than any inherit_level. */ int res = 0; #if 0 fprintf(stderr, "find_inherit(0x%08lx, \"%s\")...\n", (unsigned long)p, name->str); #endif /* 0 */
pike.git/src/program.c:5512:
do_inherit(Pike_sp-1, flags, s); free_string(s); pop_stack(); } /** * Find an identifier relative to the program being compiled. * * @return Return the index of the identifier found, otherwise -1. */
-
int isidentifier(struct pike_string *s)
+
int isidentifier(
const
struct pike_string *s)
{ return really_low_find_shared_string_identifier(s, Pike_compiler->new_program, SEE_PROTECTED|SEE_PRIVATE); } /* * Definition of identifiers. * * Pike has three plus one classes of identifiers:
pike.git/src/program.c:6874:
* B-+-foo All versions of Pike * | * +-A---foo * * External lookup of identifier "foo" in F(): * * F-+-A---foo --- Pike 7.7.33 * | * +-E---foo Pike 7.7.34 --- */
-
PMOD_EXPORT int really_low_find_shared_string_identifier(struct pike_string *name,
+
PMOD_EXPORT int really_low_find_shared_string_identifier(
const
struct pike_string *name,
const struct program *prog, int flags) { struct reference *funp; struct identifier *fun; int id, i, depth, last_inh; #if 0 CDFPRINTF("th(%ld) %p Trying to find %s flags=%d\n", (long)th_self(), prog, name->str, flags);
pike.git/src/program.c:7134:
Pike_error("Too few arguments to %S(). Expected %O.\n", name, Pike_sp-1); } } else { Pike_error("Too many arguments to %S().\n", name); } } PMOD_EXPORT int low_find_lfun(struct program *p, enum LFUN lfun) {
-
struct pike_string *lfun_name;
+
const
struct pike_string *lfun_name;
unsigned int flags = 0; int i; struct identifier *id; #ifdef PIKE_DEBUG if ((size_t)lfun >= NELEM(lfun_strings)) { return find_lfun_fatal(p, lfun); } #endif lfun_name = lfun_strings[lfun];
pike.git/src/program.c:7179:
if (!id) return -1; if (TYPEOF(*id) == T_INT) return id->u.integer; my_yyerror("Bad entry in lfun lookup table for %S.", lfun_name); return -1; } /** * Lookup the number of a function in a program given the name in * a shared_string */
-
int low_find_shared_string_identifier(struct pike_string *name,
+
int low_find_shared_string_identifier(
const
struct pike_string *name,
const struct program *prog) { int max,min,tst; struct identifier *fun; if(prog->flags & PROGRAM_FIXED) { unsigned short *funindex = prog->identifier_index; size_t val_n = PTR_TO_INT (name);