aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
commitc6f7181e910b6b2ff1346b5486a31be87b1da5af (patch)
tree92cc716487c83ecd9860444f23fd55ef65358cbb /lapi.c
parent437a5b07d415e1a74160ddfd804017171d6cc5cb (diff)
downloadlua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.gz
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.bz2
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.zip
No more LUA_ERRGCMM errors
Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 0f0166e5..8ff7bfbd 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1276,10 +1276,8 @@ void lua_setwarnf (lua_State *L, lua_WarnFunction f, void *ud) {
1276 1276
1277 1277
1278void lua_warning (lua_State *L, const char *msg) { 1278void lua_warning (lua_State *L, const char *msg) {
1279 lua_WarnFunction wf = G(L)->warnf;
1280 lua_lock(L); 1279 lua_lock(L);
1281 if (wf != NULL) 1280 luaE_warning(L, msg);
1282 wf(&G(L)->ud_warn, msg);
1283 lua_unlock(L); 1281 lua_unlock(L);
1284} 1282}
1285 1283