diff options
Diffstat (limited to 'lglobal.h')
-rw-r--r-- | lglobal.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lglobal.h b/lglobal.h new file mode 100644 index 00000000..00edb4c6 --- /dev/null +++ b/lglobal.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | ** $Id: $ | ||
3 | ** Global variables | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
7 | #ifndef lglobal_h | ||
8 | #define lglobal_h | ||
9 | |||
10 | |||
11 | #include "lobject.h" | ||
12 | |||
13 | |||
14 | typedef struct { | ||
15 | TObject object; | ||
16 | TaggedString *varname; | ||
17 | } Symbol; | ||
18 | |||
19 | |||
20 | extern Symbol *luaG_global; /* global variables */ | ||
21 | extern int luaG_nglobal; /* number of global variable (for luac) */ | ||
22 | |||
23 | |||
24 | Word luaG_findsymbolbyname (char *name); | ||
25 | Word luaG_findsymbol (TaggedString *t); | ||
26 | int luaG_globaldefined (char *name); | ||
27 | int luaG_nextvar (Word next); | ||
28 | char *luaG_travsymbol (int (*fn)(TObject *)); | ||
29 | |||
30 | |||
31 | #define s_object(i) (luaG_global[i].object) | ||
32 | #define s_ttype(i) (ttype(&s_object(i))) | ||
33 | |||
34 | |||
35 | #endif | ||