pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
2002-02-14
2002-02-14 15:20:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>
e8d37db09cdd330dd7533ecea62058565b5eefa4 (
14
lines) (+
13
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added magic identifier UNDEFINED.
Fixes [bug
2756 (#2756)
].
Rev: src/program.c:1.403
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
402
2002/02/
06
17
:
23
:
24
grubba Exp $");
+
RCSID("$Id: program.c,v 1.
403
2002/02/
14
15
:
20
:
48
grubba Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
100:
#include "compilation.h" struct pike_string *this_program_string=0;
+
static struct pike_string *UNDEFINED_string=0;
char *lfun_names[] = { "__INIT",
999:
s.u.program=Pike_compiler->new_program; return mkconstantsvaluenode(&s); }
+
/* Handle UNDEFINED */
+
if (ident == UNDEFINED_string) {
+
struct svalue s;
+
s.type = T_INT;
+
s.subtype = NUMBER_UNDEFINED;
+
s.u.integer = 0;
+
return mkconstantsvaluenode(&s);
+
}
if(resolve_cache) {
5559:
init_program_blocks(); MAKE_CONSTANT_SHARED_STRING(this_program_string,"this_program");
+
MAKE_CONSTANT_SHARED_STRING(UNDEFINED_string,"UNDEFINED");
lfun_ids = allocate_mapping(NUM_LFUNS); lfun_types = allocate_mapping(NUM_LFUNS);
5619:
{ int e;
+
free_string(UNDEFINED_string);
free_string(this_program_string); free_mapping(lfun_types);