EgtGeneral 1.6e2 :

- aggiornamenti per cambio nome include di base
- modifiche a LuaManager per direttorio librerie lua e ultima Require
- FromString e ToString per STRVECTOR
- corrette FromString per INTVECTOR e DBLVECTOR
This commit is contained in:
Dario Sassi
2015-05-11 20:57:52 +00:00
parent f48f1556b4
commit 043554c05d
12 changed files with 58 additions and 29 deletions
+5 -7
View File
@@ -72,6 +72,8 @@ LuaMgr::GetVersion( string& sLuaVer)
bool
LuaMgr::SetLuaLibsDir( const string& sDir)
{
// salvo il direttorio
m_sLuaLibsDir = sDir ;
// recupero la stringa globale package.path
lua_getglobal( m_pL, "package") ;
lua_getfield( m_pL, -1, "path") ;
@@ -95,6 +97,9 @@ LuaMgr::SetLuaLibsDir( const string& sDir)
bool
LuaMgr::Require( const string& sFile)
{
// salvo nome libreria richiesta
m_sLastRequire = sFile ;
// eseguo
lua_getglobal( m_pL, "require") ;
lua_pushstring( m_pL, sFile.c_str()) ;
int nErr = lua_pcall( m_pL, 1, 1, 0) ; /* call 'require(sFile)' */
@@ -228,10 +233,3 @@ LuaMgr::ExecFile( const string& sFile)
return false ;
}
}
//----------------------------------------------------------------------------
const string&
LuaMgr::GetLastError( void)
{
return m_sLastError ;
}