diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-04 15:23:12 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-04 15:23:12 -0200 |
commit | cde179b36979c58d9380d3c4dd29b61412d13b51 (patch) | |
tree | 804c457691024d797a7479eddf711e103966b513 /ldo.c | |
parent | 80b39d83c3512e1dd627842e64c69841638d9088 (diff) | |
download | lua-cde179b36979c58d9380d3c4dd29b61412d13b51.tar.gz lua-cde179b36979c58d9380d3c4dd29b61412d13b51.tar.bz2 lua-cde179b36979c58d9380d3c4dd29b61412d13b51.zip |
new implementation for global variable values (separated from strings)
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.49 1999/10/14 17:53:35 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.50 1999/10/14 19:46:57 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 | */ |
@@ -219,7 +219,7 @@ void luaD_calln (int nArgs, int nResults) { | |||
219 | 219 | ||
220 | 220 | ||
221 | static void message (const char *s) { | 221 | static void message (const char *s) { |
222 | const TObject *em = &(luaS_new("_ERRORMESSAGE")->u.s.globalval); | 222 | const TObject *em = &(luaS_assertglobalbyname("_ERRORMESSAGE")->value); |
223 | if (ttype(em) == LUA_T_PROTO || ttype(em) == LUA_T_CPROTO || | 223 | if (ttype(em) == LUA_T_PROTO || ttype(em) == LUA_T_CPROTO || |
224 | ttype(em) == LUA_T_CLOSURE) { | 224 | ttype(em) == LUA_T_CLOSURE) { |
225 | *L->stack.top = *em; | 225 | *L->stack.top = *em; |
@@ -237,7 +237,6 @@ void lua_error (const char *s) { | |||
237 | if (L->errorJmp) | 237 | if (L->errorJmp) |
238 | longjmp(L->errorJmp->b, 1); | 238 | longjmp(L->errorJmp->b, 1); |
239 | else { | 239 | else { |
240 | LUA_INTERNALERROR("exit!!"); | ||
241 | message("exit(1). Unable to recover.\n"); | 240 | message("exit(1). Unable to recover.\n"); |
242 | exit(1); | 241 | exit(1); |
243 | } | 242 | } |