aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-23 10:38:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-23 10:38:56 -0300
commitd164e2294f73d8e69f00d95a66014514b2dd0ec0 (patch)
tree712f493ccaef76fd4976739b87eae16fc8a519ad
parent2cc94ac81bfc1e1c189f2b4c31cc46cb36e21682 (diff)
downloadlua-d164e2294f73d8e69f00d95a66014514b2dd0ec0.tar.gz
lua-d164e2294f73d8e69f00d95a66014514b2dd0ec0.tar.bz2
lua-d164e2294f73d8e69f00d95a66014514b2dd0ec0.zip
_ERRORMESSAGE called through get global tag method
-rw-r--r--ldo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ldo.c b/ldo.c
index 3685dc8d..30c0c241 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 1.125 2001/02/22 17:15:18 roberto Exp roberto $ 2** $Id: ldo.c,v 1.126 2001/02/22 18:59:59 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*/
@@ -335,9 +335,8 @@ struct lua_longjmp {
335 335
336 336
337static void message (lua_State *L, const char *s) { 337static void message (lua_State *L, const char *s) {
338 const TObject *em = luaH_getstr(L->gt, luaS_newliteral(L, LUA_ERRORMESSAGE)); 338 luaV_getglobal(L, luaS_newliteral(L, LUA_ERRORMESSAGE), L->top);
339 if (ttype(em) == LUA_TFUNCTION) { 339 if (ttype(L->top) == LUA_TFUNCTION) {
340 setobj(L->top, em);
341 incr_top; 340 incr_top;
342 setsvalue(L->top, luaS_new(L, s)); 341 setsvalue(L->top, luaS_new(L, s));
343 incr_top; 342 incr_top;