aboutsummaryrefslogtreecommitdiff
path: root/lstate.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 /lstate.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 'lstate.c')
-rw-r--r--lstate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lstate.c b/lstate.c
index b3e9ec60..7f6475a8 100644
--- a/lstate.c
+++ b/lstate.c
@@ -409,3 +409,10 @@ LUA_API void lua_close (lua_State *L) {
409} 409}
410 410
411 411
412void luaE_warning (lua_State *L, const char *msg) {
413 lua_WarnFunction wf = G(L)->warnf;
414 if (wf != NULL)
415 wf(&G(L)->ud_warn, msg);
416}
417
418