mirror of
https://github.com/lua/lua.git
synced 2024-11-27 12:13:38 +08:00
_ERRORMESSAGE called through get global tag method
This commit is contained in:
parent
2cc94ac81b
commit
d164e2294f
7
ldo.c
7
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;
|
||||
|
Loading…
Reference in New Issue
Block a user