summaryrefslogtreecommitdiff
path: root/tests/tolua/libtest1/TestMod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tolua/libtest1/TestMod.cpp')
-rwxr-xr-xtests/tolua/libtest1/TestMod.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tolua/libtest1/TestMod.cpp b/tests/tolua/libtest1/TestMod.cpp
index 491001c..912d652 100755
--- a/tests/tolua/libtest1/TestMod.cpp
+++ b/tests/tolua/libtest1/TestMod.cpp
@@ -1,6 +1,7 @@
#include "TestMod.hpp"
#include "tolua.h"
#include "TestModLua.hpp"
+#include "LuaVM.hpp"
#include <iostream>
@@ -11,9 +12,11 @@ void Derived::hello( )
cout << "hello" << endl;
}
-static void initModule( )
+static void initModule( void *user_data )
{
-// tolua_TestMod_open( 0 /* m_lua, where from? */ );
+ LuaVM *luaVm = (LuaVM *)user_data;
+
+ tolua_TestMod_open( luaVm->handle( ) );
}
static void destroyModule( )