From ca13be9af784b7288d3a07d9b5bccb329086e885 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 16 Aug 2019 09:51:54 -0300 Subject: Supressed errors in '__close' generate warnings --- lgc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lgc.c') 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) { L->allowhook = oldah; /* restore hooks */ g->gcrunning = running; /* restore state */ if (unlikely(status != LUA_OK)) { /* error while running __gc? */ - const char *msg = (ttisstring(s2v(L->top - 1))) - ? svalue(s2v(L->top - 1)) - : "error object is not a string"; - luaE_warning(L, "error in __gc metamethod (", 1); - luaE_warning(L, msg, 1); - luaE_warning(L, ")", 0); + luaE_warnerror(L, "__gc metamethod"); L->top--; /* pops error object */ } } -- cgit v1.2.3-55-g6feb