diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-09-26 07:23:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 07:23:48 -0400 |
commit | 03428d9825cfdf2cfaed6ac9410dafccac0d4f3a (patch) | |
tree | 3f6bacfa9e074e6e523698a10b0195349612eaa8 /lib/lua/src/lapi.c | |
parent | f916398a541dbd09cbf14409f358556bc42f5535 (diff) | |
download | minetest-03428d9825cfdf2cfaed6ac9410dafccac0d4f3a.tar.xz |
Modify PUC Lua to wrap C++ exceptions (#12445)
Diffstat (limited to 'lib/lua/src/lapi.c')
-rw-r--r-- | lib/lua/src/lapi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/lua/src/lapi.c b/lib/lua/src/lapi.c index 5d5145d2e..383e65d60 100644 --- a/lib/lua/src/lapi.c +++ b/lib/lua/src/lapi.c @@ -137,6 +137,18 @@ LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { } +/* MINETEST-SPECIFIC CHANGE */ +LUA_API lua_CFunctionwrapper lua_atccall (lua_State *L, + lua_CFunctionwrapper wrapf) { + lua_CFunctionwrapper old; + lua_lock(L); + old = G(L)->wrapcf; + G(L)->wrapcf = wrapf; + lua_unlock(L); + return old; +} + + LUA_API lua_State *lua_newthread (lua_State *L) { lua_State *L1; lua_lock(L); |