示例#1
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);
        }
示例#2
0
        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);
        }