diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-08 09:36:50 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-08 09:36:50 +0200 |
commit | d6d7bbc9c32d5c060e48a3cfae006871f756cfaf (patch) | |
tree | 6bc2e9b3f95163edd3948f7e234becd4ee9d4f1b /tests | |
parent | 48fece09164ce52753579a7225bc471d1fa44dea (diff) | |
download | crawler-d6d7bbc9c32d5c060e48a3cfae006871f756cfaf.tar.gz crawler-d6d7bbc9c32d5c060e48a3cfae006871f756cfaf.tar.bz2 |
added flags to module loader, CLOSE_DEFERRED is deferring dlclose with a atexit
function, so that the tolua test runs now
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/modules/test4.cpp | 2 | ||||
-rwxr-xr-x | tests/tolua/test1.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/modules/test4.cpp b/tests/modules/test4.cpp index 4e71295..5630966 100755 --- a/tests/modules/test4.cpp +++ b/tests/modules/test4.cpp @@ -24,7 +24,7 @@ int main( void ) UserData user_data; user_data.version = 47; user_data.text.assign( "hello there" ); - ModuleLoader<Base> loader( modules, (void *)&user_data ); + ModuleLoader<Base> loader( modules, DEFAULT_FLAGS, (void *)&user_data ); Base *obj = loader.create( "testmod4" ); c.print( "hello from main" ); diff --git a/tests/tolua/test1.cpp b/tests/tolua/test1.cpp index 271544e..a3810e2 100755 --- a/tests/tolua/test1.cpp +++ b/tests/tolua/test1.cpp @@ -18,13 +18,11 @@ int main( int /* argc */, char *argv[] ) vector<string> modules; modules.push_back( "./libtest1/mod_test.so" ); - ModuleLoader<Base> loader( modules, (void *)&luaVm ); + ModuleLoader<Base> loader( modules, CLOSE_DEFERRED, (void *)&luaVm ); luaVm.loadSource( argv[1] ); luaVm.executeMain( ); - return 0; - } catch( exception &e ) { LOG( logFATAL ) << "ERROR: " << e.what( ); return 1; |