diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-14 13:08:41 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-14 13:08:41 +0200 |
commit | c757efa3ee6f395e3ada3088065c73eb953f6834 (patch) | |
tree | 8660ca4d2ec0024177541cd4ca123e04e6541252 /src/libcrawler/libcrawler.cpp | |
parent | 0fdd066c566564a786e9070fbfb82a0b70bd1790 (diff) | |
download | crawler-c757efa3ee6f395e3ada3088065c73eb953f6834.tar.gz crawler-c757efa3ee6f395e3ada3088065c73eb953f6834.tar.bz2 |
added initialize_libcrawler instead of silly tolua trick in the main program
Diffstat (limited to 'src/libcrawler/libcrawler.cpp')
-rw-r--r-- | src/libcrawler/libcrawler.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libcrawler/libcrawler.cpp b/src/libcrawler/libcrawler.cpp new file mode 100644 index 0000000..0c549a4 --- /dev/null +++ b/src/libcrawler/libcrawler.cpp @@ -0,0 +1,18 @@ +#include "libcrawler.hpp" + +#include <iostream> + +#ifdef WITH_LUA +#include "tolua.h" +#include "URLLua.hpp" +#include "LuaVM.hpp" +#endif + +void initialize_libcrawler( void *user_data ) +{ +#ifdef WITH_LUA + LuaVM *vm = (LuaVM *)user_data; + tolua_URL_open( vm->handle( ) ); +#endif +} + |