mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Modify PUC Lua to wrap C++ exceptions (#12445)
This commit is contained in:
parent
f916398a54
commit
03428d9825
7 changed files with 105 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue