aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-04 15:23:12 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-04 15:23:12 -0200
commitcde179b36979c58d9380d3c4dd29b61412d13b51 (patch)
tree804c457691024d797a7479eddf711e103966b513 /ldo.c
parent80b39d83c3512e1dd627842e64c69841638d9088 (diff)
downloadlua-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ldo.c b/ldo.c
index 2bbfdd5f..c8797a7c 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
221static void message (const char *s) { 221static 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 }