diff options
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -854,12 +854,7 @@ static void GCTM (lua_State *L) { | |||
854 | L->allowhook = oldah; /* restore hooks */ | 854 | L->allowhook = oldah; /* restore hooks */ |
855 | g->gcrunning = running; /* restore state */ | 855 | g->gcrunning = running; /* restore state */ |
856 | if (unlikely(status != LUA_OK)) { /* error while running __gc? */ | 856 | if (unlikely(status != LUA_OK)) { /* error while running __gc? */ |
857 | const char *msg = (ttisstring(s2v(L->top - 1))) | 857 | luaE_warnerror(L, "__gc metamethod"); |
858 | ? svalue(s2v(L->top - 1)) | ||
859 | : "error object is not a string"; | ||
860 | luaE_warning(L, "error in __gc metamethod (", 1); | ||
861 | luaE_warning(L, msg, 1); | ||
862 | luaE_warning(L, ")", 0); | ||
863 | L->top--; /* pops error object */ | 858 | L->top--; /* pops error object */ |
864 | } | 859 | } |
865 | } | 860 | } |