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:
+5
-7
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user