This commit is contained in:
Glenn Maynard
2007-01-15 04:17:15 +00:00
parent a1611de0c4
commit 17ad7bb1bf
4 changed files with 26 additions and 0 deletions
+7
View File
@@ -193,6 +193,13 @@ void LuaTable::Set( Lua *L, const RString &sKey )
lua_settop( L, iTop-1 ); // remove all of the above
}
void LuaTable::Get( Lua *L, const RString &sKey )
{
this->PushSelf( L );
lua_getfield( L, -1, sKey );
lua_remove( L, -2 ); // remove self
}
namespace LuaHelpers
{
template<> void Push<LuaReference>( lua_State *L, const LuaReference &Object )