diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-16 09:51:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-16 09:51:54 -0300 |
commit | ca13be9af784b7288d3a07d9b5bccb329086e885 (patch) | |
tree | c027419f98064d681518a4130439920a13a11b06 /lgc.c | |
parent | a1d8eb27431c02c4529be1efd92143ad65434f3a (diff) | |
download | lua-ca13be9af784b7288d3a07d9b5bccb329086e885.tar.gz lua-ca13be9af784b7288d3a07d9b5bccb329086e885.tar.bz2 lua-ca13be9af784b7288d3a07d9b5bccb329086e885.zip |
Supressed errors in '__close' generate warnings
Diffstat (limited to '')
-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 | } |