CString -> RString
This commit is contained in:
@@ -160,7 +160,7 @@ void LuaReference::ReRegister()
|
||||
}
|
||||
|
||||
|
||||
void LuaExpression::SetFromExpression( const CString &sExpression )
|
||||
void LuaExpression::SetFromExpression( const RString &sExpression )
|
||||
{
|
||||
m_sExpression = "return " + sExpression;
|
||||
Register();
|
||||
@@ -182,7 +182,7 @@ void LuaExpression::Register()
|
||||
LUA->Release( L );
|
||||
}
|
||||
|
||||
CString LuaData::Serialize() const
|
||||
RString LuaData::Serialize() const
|
||||
{
|
||||
/* Call Serialize(t), where t is our referenced object. */
|
||||
Lua *L = LUA->Get();
|
||||
@@ -201,7 +201,7 @@ CString LuaData::Serialize() const
|
||||
const char *pString = lua_tostring( L, -1 );
|
||||
ASSERT_M( pString != NULL, "Serialize() didn't return a string" );
|
||||
|
||||
CString sRet = pString;
|
||||
RString sRet = pString;
|
||||
lua_pop( L, 1 );
|
||||
|
||||
LUA->Release( L );
|
||||
@@ -209,12 +209,12 @@ CString LuaData::Serialize() const
|
||||
return sRet;
|
||||
}
|
||||
|
||||
void LuaData::LoadFromString( const CString &s )
|
||||
void LuaData::LoadFromString( const RString &s )
|
||||
{
|
||||
Lua *L = LUA->Get();
|
||||
|
||||
/* Restore the serialized data by evaluating it. */
|
||||
CString sError;
|
||||
RString sError;
|
||||
if( !LuaHelpers::RunScript( L, s, "serialization", sError, 1 ) )
|
||||
{
|
||||
/* Serialize() should never return an invalid script. Drop the failed
|
||||
@@ -253,7 +253,7 @@ LuaTable::LuaTable()
|
||||
LUA->Release( L );
|
||||
}
|
||||
|
||||
void LuaTable::Set( Lua *L, const CString &sKey )
|
||||
void LuaTable::Set( Lua *L, const RString &sKey )
|
||||
{
|
||||
int iTop = lua_gettop( L );
|
||||
this->PushSelf( L );
|
||||
@@ -263,7 +263,7 @@ void LuaTable::Set( Lua *L, const CString &sKey )
|
||||
lua_settop( L, iTop-1 ); // remove all of the above
|
||||
}
|
||||
|
||||
void LuaTable::Unset( Lua *L, const CString &sKey )
|
||||
void LuaTable::Unset( Lua *L, const RString &sKey )
|
||||
{
|
||||
lua_pushnil( L );
|
||||
Set( L, sKey );
|
||||
|
||||
Reference in New Issue
Block a user