public int Resume <T1>(T1 arg1) { luaState.Push(this); IntPtr L = luaState.LuaToThread(-1); luaState.LuaPop(1); StackTraits <T1> .Push(L, arg1); int ret = Resume(L, 1); if (ret == 0) { Dispose(); } return(ret); }
public int Resume <R1>(out R1 ret1) { luaState.Push(this); IntPtr L = luaState.LuaToThread(-1); luaState.LuaPop(1); int ret = Resume(L, 0); if (ret == 0) { ret1 = default(R1); Dispose(); } else { int top = LuaDLL.lua_gettop(L); ret1 = StackTraits <R1> .Check(L, top); } return(ret); }
internal void PushGeneric <T>(T arg) { StackTraits <T> .Push(L, arg); }
internal T CheckValue <T>(int stackPos) { return(StackTraits <T> .Check(L, stackPos)); }
private void InitTypeTraits() { LuaStackOp op = new LuaStackOp(); StackTraits <int> .Init(op.Push, op.CheckInt32, op.ToInt32); }