]> git.lizzy.rs Git - minetest.git/blobdiff - lib/lua/src/lapi.c
Modify PUC Lua to wrap C++ exceptions (#12445)
[minetest.git] / lib / lua / src / lapi.c
index 5d5145d2ebad96ee5f14b5d06cfa9bad7dcef58c..383e65d60bec90438df02a3d659dae284807b037 100644 (file)
@@ -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);