LuaInterface.LuaDLL.lua_pushglobaltable C# (CSharp) Method

lua_pushglobaltable() public static method

public static lua_pushglobaltable ( IntPtr l ) : void
l System.IntPtr
return void
        public static void lua_pushglobaltable(IntPtr l)
        {
            lua_rawgeti(l, LuaIndexes.LUA_REGISTRYINDEX, 2); 
        }

Usage Example

示例#1
0
        public void LuaRawGlobal(string name)
        {
#if LUAC_5_3
            LuaDLL.lua_pushglobaltable(L);
            int top = LuaDLL.lua_gettop(L);
            LuaDLL.lua_pushstring(L, name);
            LuaDLL.lua_rawget(L, top);
            //弹出global table
            LuaDLL.lua_remove(L, top);
#else
            LuaDLL.lua_pushstring(L, name);
            LuaDLL.lua_rawget(L, LuaIndexes.LUA_GLOBALSINDEX);
#endif
        }
All Usage Examples Of LuaInterface.LuaDLL::lua_pushglobaltable
LuaDLL