static int Call(IntPtr L) { try { LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); return(obj.Call(L)); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Destroy(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaInterface.LuaMethod obj = (LuaInterface.LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaInterface.LuaMethod)); obj.Destroy(); ToLua.Destroy(L); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static void PushLuaMethod(IntPtr L, MethodInfo md, Type t, Type[] types) { if (md != null) { LuaMethod lm = new LuaMethod(md, t, types); ToLua.PushObject(L, lm); } else { LuaDLL.lua_pushnil(L); } }