MCPcopy Create free account
hub / github.com/Tencent/xLua / csharp_function_wrap

Function csharp_function_wrap

WebGLPlugins/xlua.c:735–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735static 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
753LUA_API void xlua_push_csharp_function(lua_State* L, lua_CFunction fn, int n)
754{

Callers

nothing calls this directly

Calls 7

lua_tocfunctionFunction · 0.85
lua_tobooleanFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_replaceFunction · 0.85
lua_errorFunction · 0.85
lua_gethookFunction · 0.85
call_ret_hookFunction · 0.85

Tested by

no test coverage detected