diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 21:15:07 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 21:15:07 +0200 |
commit | b577b7119aa1f57c4db7fd254c2b5b197e7451d2 (patch) | |
tree | 35a414060da573f1d761dad2bb03f00e93b8bbef /tests | |
parent | b0e4bb27b2f5cb2b54cb615a3100ef8aa4474600 (diff) | |
download | crawler-b577b7119aa1f57c4db7fd254c2b5b197e7451d2.tar.gz crawler-b577b7119aa1f57c4db7fd254c2b5b197e7451d2.tar.bz2 |
must load all symbols of a C++/Lua module, otherwise the lua_open function
can't be called from the Lua VM during module initialization
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tolua/libtest1/TestMod.cpp | 2 | ||||
-rwxr-xr-x | tests/tolua/test1.cpp | 2 | ||||
-rw-r--r-- | tests/tolua/test1.lua | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/tests/tolua/libtest1/TestMod.cpp b/tests/tolua/libtest1/TestMod.cpp index afef87a..912d652 100755 --- a/tests/tolua/libtest1/TestMod.cpp +++ b/tests/tolua/libtest1/TestMod.cpp @@ -16,8 +16,6 @@ static void initModule( void *user_data ) { LuaVM *luaVm = (LuaVM *)user_data; - cout << luaVm->handle( ) << endl; - tolua_TestMod_open( luaVm->handle( ) ); } diff --git a/tests/tolua/test1.cpp b/tests/tolua/test1.cpp index a2bff4d..902b278 100755 --- a/tests/tolua/test1.cpp +++ b/tests/tolua/test1.cpp @@ -16,8 +16,6 @@ int main( int /* argc */, char *argv[] ) LuaVM luaVm; - cout << luaVm.handle( ) << endl; - vector<string> modules; modules.push_back( "./libtest1/mod_test.so" ); ModuleLoader<Base> loader( modules, (void *)&luaVm ); diff --git a/tests/tolua/test1.lua b/tests/tolua/test1.lua index 20d97cf..74b3852 100644 --- a/tests/tolua/test1.lua +++ b/tests/tolua/test1.lua @@ -1 +1,2 @@ local b = Derived:new( ) +b:hello( ) |