correct locking semantics for LuaReference (SGameplay commit in a moment)

This commit is contained in:
Glenn Maynard
2005-06-16 03:13:06 +00:00
parent 63eebeb75e
commit 1e02955e63
4 changed files with 80 additions and 50 deletions
+8 -4
View File
@@ -115,8 +115,10 @@ void Profile::InitGeneralData()
ZERO( m_iNumStagesPassedByPlayMode );
ZERO( m_iNumStagesPassedByGrade );
lua_newtable( LUA->L );
m_SavedLuaData.SetFromStack();
Lua *L = LUA->Get();
lua_newtable( L );
m_SavedLuaData.SetFromStack( L );
LUA->Release( L );
}
void Profile::InitSongScores()
@@ -1099,8 +1101,10 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
if( m_SavedLuaData.GetLuaType() != LUA_TTABLE )
{
LOG->Warn( "Profile data did not evaluate to a table" );
lua_newtable( LUA->L );
m_SavedLuaData.SetFromStack();
Lua *L = LUA->Get();
lua_newtable( L );
m_SavedLuaData.SetFromStack( L );
LUA->Release( L );
}
}
}