summaryrefslogtreecommitdiff
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-github-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.gz
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) {
void lua_warning (lua_State *L, const char *msg) {
- lua_WarnFunction wf = G(L)->warnf;
lua_lock(L);
- if (wf != NULL)
- wf(&G(L)->ud_warn, msg);
+ luaE_warning(L, msg);
lua_unlock(L);
}