summaryrefslogtreecommitdiff
path: root/tests/modules/testmod4/TestMod4.cpp
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-10-05 12:39:14 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-10-05 12:39:14 +0200
commit4174158dc75b5ed892b293b18b7dd5c85aa36f2f (patch)
tree15833550838d912174c54d05583d5374f03c35e9 /tests/modules/testmod4/TestMod4.cpp
parentd207e5a4f68cf56699b6f59487d3456f1c5e5f01 (diff)
downloadcrawler-4174158dc75b5ed892b293b18b7dd5c85aa36f2f.tar.gz
crawler-4174158dc75b5ed892b293b18b7dd5c85aa36f2f.tar.bz2
added void * userdata to initModule
Diffstat (limited to 'tests/modules/testmod4/TestMod4.cpp')
-rwxr-xr-xtests/modules/testmod4/TestMod4.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/modules/testmod4/TestMod4.cpp b/tests/modules/testmod4/TestMod4.cpp
index cd0578e..de8b1b6 100755
--- a/tests/modules/testmod4/TestMod4.cpp
+++ b/tests/modules/testmod4/TestMod4.cpp
@@ -1,10 +1,12 @@
#include "TestMod4.hpp"
#include "Common.hpp"
+#include "UserData.hpp"
#include <iostream>
#include <vector>
#include <string>
+#include <sstream>
using namespace std;
@@ -21,9 +23,15 @@ void Derived::hello( )
Common::instance( ).print( "hello world from module" );
}
-static void initModule( )
+static void initModule( void *user_data )
{
- Common::instance( ).print( "Module 4 initModule called" );
+ UserData *data = (UserData *)user_data;
+ ostringstream ss;
+
+ ss << "Module 4 initModule called with user data: "
+ << data->version << " " << data->text;
+
+ Common::instance( ).print( ss.str( ) );
}
static void destroyModule( )