| 733 | } |
| 734 | |
| 735 | static int csharp_function_wrap(lua_State *L) { |
| 736 | lua_CFunction fn = (lua_CFunction)lua_tocfunction(L, lua_upvalueindex(1)); |
| 737 | int ret = fn(L); |
| 738 | |
| 739 | if (lua_toboolean(L, lua_upvalueindex(2))) |
| 740 | { |
| 741 | lua_pushboolean(L, 0); |
| 742 | lua_replace(L, lua_upvalueindex(2)); |
| 743 | return lua_error(L); |
| 744 | } |
| 745 | |
| 746 | if (lua_gethook(L)) { |
| 747 | call_ret_hook(L); |
| 748 | } |
| 749 | |
| 750 | return ret; |
| 751 | } |
| 752 | |
| 753 | LUA_API void xlua_push_csharp_function(lua_State* L, lua_CFunction fn, int n) |
| 754 | { |
nothing calls this directly
no test coverage detected