From 03428d9825cfdf2cfaed6ac9410dafccac0d4f3a Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Mon, 26 Sep 2022 07:23:48 -0400 Subject: Modify PUC Lua to wrap C++ exceptions (#12445) --- lib/lua/src/lua.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/lua/src/lua.h') diff --git a/lib/lua/src/lua.h b/lib/lua/src/lua.h index a4b73e743..1d7fe927f 100644 --- a/lib/lua/src/lua.h +++ b/lib/lua/src/lua.h @@ -113,6 +113,11 @@ LUA_API lua_State *(lua_newthread) (lua_State *L); LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); +/* MINETEST-SPECIFIC CHANGE: Let custom code wrap C function calls. */ +typedef int (*lua_CFunctionwrapper)(lua_State *L, lua_CFunction f); +LUA_API lua_CFunctionwrapper (lua_atccall) (lua_State *L, + lua_CFunctionwrapper wrapf); + /* ** basic stack manipulation -- cgit v1.2.3