aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lgc.c b/lgc.c
index 75670c0a..f24074f9 100644
--- a/lgc.c
+++ b/lgc.c
@@ -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 }