From b8a049abed1f021009930a3030b484e70f89f001 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 16 Sep 1997 16:25:59 -0300 Subject: Global variables --- lglobal.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lglobal.h (limited to 'lglobal.h') diff --git a/lglobal.h b/lglobal.h new file mode 100644 index 00000000..00edb4c6 --- /dev/null +++ b/lglobal.h @@ -0,0 +1,35 @@ +/* +** $Id: $ +** Global variables +** See Copyright Notice in lua.h +*/ + +#ifndef lglobal_h +#define lglobal_h + + +#include "lobject.h" + + +typedef struct { + TObject object; + TaggedString *varname; +} Symbol; + + +extern Symbol *luaG_global; /* global variables */ +extern int luaG_nglobal; /* number of global variable (for luac) */ + + +Word luaG_findsymbolbyname (char *name); +Word luaG_findsymbol (TaggedString *t); +int luaG_globaldefined (char *name); +int luaG_nextvar (Word next); +char *luaG_travsymbol (int (*fn)(TObject *)); + + +#define s_object(i) (luaG_global[i].object) +#define s_ttype(i) (ttype(&s_object(i))) + + +#endif -- cgit v1.2.3-55-g6feb