Beispiel #1
0
        public int Resume <T1, T2, T3, R1>(T1 arg1, T2 arg2, T3 arg3, out R1 ret1)
        {
            luaState.Push(this);
            IntPtr L = luaState.LuaToThread(-1);

            luaState.LuaPop(1);
            StackTraits <T1> .Push(L, arg1);

            StackTraits <T2> .Push(L, arg2);

            StackTraits <T3> .Push(L, arg3);

            int ret = Resume(L, 3);

            if (ret == 0)
            {
                ret1 = default(R1);
                Dispose();
            }
            else
            {
                int top = LuaDLL.lua_gettop(L);
                ret1 = StackTraits <R1> .Check(L, top);
            }

            return(ret);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 internal void PushGeneric <T>(T arg)
 {
     StackTraits <T> .Push(L, arg);
 }