diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 12:39:14 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 12:39:14 +0200 |
commit | 4174158dc75b5ed892b293b18b7dd5c85aa36f2f (patch) | |
tree | 15833550838d912174c54d05583d5374f03c35e9 /tests/modules/testmod4/TestMod4.cpp | |
parent | d207e5a4f68cf56699b6f59487d3456f1c5e5f01 (diff) | |
download | crawler-4174158dc75b5ed892b293b18b7dd5c85aa36f2f.tar.gz crawler-4174158dc75b5ed892b293b18b7dd5c85aa36f2f.tar.bz2 |
added void * userdata to initModule
Diffstat (limited to 'tests/modules/testmod4/TestMod4.cpp')
-rwxr-xr-x | tests/modules/testmod4/TestMod4.cpp | 12 |
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( ) |