| 773 | } |
| 774 | |
| 775 | static int csharp_function_wrapper_wrapper(lua_State *L) { |
| 776 | int ret = 0; |
| 777 | |
| 778 | if (g_csharp_wrapper_caller == NULL) { |
| 779 | return luaL_error(L, "g_csharp_wrapper_caller not set"); |
| 780 | } |
| 781 | |
| 782 | ret = g_csharp_wrapper_caller(L, xlua_tointeger(L, lua_upvalueindex(1)), lua_gettop(L)); |
| 783 | |
| 784 | if (lua_toboolean(L, lua_upvalueindex(2))) |
| 785 | { |
| 786 | lua_pushboolean(L, 0); |
| 787 | lua_replace(L, lua_upvalueindex(2)); |
| 788 | return lua_error(L); |
| 789 | } |
| 790 | |
| 791 | if (lua_gethook(L)) { |
| 792 | call_ret_hook(L); |
| 793 | } |
| 794 | |
| 795 | return ret; |
| 796 | } |
| 797 | |
| 798 | LUA_API void xlua_push_csharp_wrapper(lua_State* L, int wrapperid) |
| 799 | { |
nothing calls this directly
no test coverage detected