commit d164e2294f73d8e69f00d95a66014514b2dd0ec0
parent 2cc94ac81bfc1e1c189f2b4c31cc46cb36e21682
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 23 Feb 2001 10:38:34 -0300
_ERRORMESSAGE called through get global tag method
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/ldo.c b/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.125 2001/02/22 17:15:18 roberto Exp roberto $
+** $Id: ldo.c,v 1.126 2001/02/22 18:59:59 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -335,9 +335,8 @@ struct lua_longjmp {
static void message (lua_State *L, const char *s) {
- const TObject *em = luaH_getstr(L->gt, luaS_newliteral(L, LUA_ERRORMESSAGE));
- if (ttype(em) == LUA_TFUNCTION) {
- setobj(L->top, em);
+ luaV_getglobal(L, luaS_newliteral(L, LUA_ERRORMESSAGE), L->top);
+ if (ttype(L->top) == LUA_TFUNCTION) {
incr_top;
setsvalue(L->top, luaS_new(L, s));
incr_top;