summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-10-05 21:15:07 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-10-05 21:15:07 +0200
commitb577b7119aa1f57c4db7fd254c2b5b197e7451d2 (patch)
tree35a414060da573f1d761dad2bb03f00e93b8bbef /tests
parentb0e4bb27b2f5cb2b54cb615a3100ef8aa4474600 (diff)
downloadcrawler-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-xtests/tolua/libtest1/TestMod.cpp2
-rwxr-xr-xtests/tolua/test1.cpp2
-rw-r--r--tests/tolua/test1.lua1
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( )