LuaInterface.LuaDLL.lua_pushvalue C# (CSharp) Method

lua_pushvalue() private method

private lua_pushvalue ( IntPtr luaState, int index ) : void
luaState System.IntPtr
index int
return void
        public static extern void lua_pushvalue(IntPtr luaState, int index);

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_pushvalue
LuaDLL