diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-08 16:32:53 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-05-08 16:32:53 -0300 |
| commit | 11a70220670f25a9929439f0b27331f09f05235c (patch) | |
| tree | c4a962b5a3e53ac6df8894fb3ad2248c4a1256cb /ldo.c | |
| parent | 35a6ed283881f313152457f24cc6c677122d5058 (diff) | |
| download | lua-11a70220670f25a9929439f0b27331f09f05235c.tar.gz lua-11a70220670f25a9929439f0b27331f09f05235c.tar.bz2 lua-11a70220670f25a9929439f0b27331f09f05235c.zip | |
global variables are stored in a Lua table
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.72 2000/03/30 20:55:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.73 2000/04/14 18:12:35 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -21,6 +21,7 @@ | |||
| 21 | #include "lparser.h" | 21 | #include "lparser.h" |
| 22 | #include "lstate.h" | 22 | #include "lstate.h" |
| 23 | #include "lstring.h" | 23 | #include "lstring.h" |
| 24 | #include "ltable.h" | ||
| 24 | #include "ltm.h" | 25 | #include "ltm.h" |
| 25 | #include "lua.h" | 26 | #include "lua.h" |
| 26 | #include "luadebug.h" | 27 | #include "luadebug.h" |
| @@ -222,7 +223,7 @@ void luaD_call (lua_State *L, StkId func, int nResults) { | |||
| 222 | 223 | ||
| 223 | 224 | ||
| 224 | static void message (lua_State *L, const char *s) { | 225 | static void message (lua_State *L, const char *s) { |
| 225 | const TObject *em = &(luaS_assertglobalbyname(L, "_ERRORMESSAGE")->value); | 226 | const TObject *em = luaH_getglobal(L, "_ERRORMESSAGE"); |
| 226 | if (*luaO_typename(em) == 'f') { | 227 | if (*luaO_typename(em) == 'f') { |
| 227 | *L->top = *em; | 228 | *L->top = *em; |
| 228 | incr_top; | 229 | incr_top; |
