LuaInterface.LuaDLL.lua_settop C# (CSharp) Method

lua_settop() private method

private lua_settop ( IntPtr luaState, int newTop ) : void
luaState System.IntPtr
newTop int
return void
        public static extern void lua_settop(IntPtr luaState, int newTop);
        public static void lua_pop(IntPtr luaState, int amount)

Usage Example

示例#1
0
            public static void RefString(IntPtr strPoint, int index, string s, IntPtr L)
            {
                int oldTop = LuaDLL.lua_gettop(L);

                LuaDLL.lua_pushvalue(L, index);
                //把字符串ref了之后就不GC了
                LuaDLL.luaL_ref(L, LuaIndexes.LUA_REGISTRYINDEX);
                LuaDLL.lua_settop(L, oldTop);
                stringDict[(long)strPoint] = s;
            }
All Usage Examples Of LuaInterface.LuaDLL::lua_settop
LuaDLL