aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 09:51:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 09:51:54 -0300
commitca13be9af784b7288d3a07d9b5bccb329086e885 (patch)
treec027419f98064d681518a4130439920a13a11b06 /lgc.c
parenta1d8eb27431c02c4529be1efd92143ad65434f3a (diff)
downloadlua-ca13be9af784b7288d3a07d9b5bccb329086e885.tar.gz
lua-ca13be9af784b7288d3a07d9b5bccb329086e885.tar.bz2
lua-ca13be9af784b7288d3a07d9b5bccb329086e885.zip
Supressed errors in '__close' generate warnings
Diffstat (limited to '')
-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 }