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/crawl/crawl.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/crawl/crawl.cpp')
-rwxr-xr-x | src/crawl/crawl.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/crawl/crawl.cpp b/src/crawl/crawl.cpp index 4abd37c..648060c 100755 --- a/src/crawl/crawl.cpp +++ b/src/crawl/crawl.cpp @@ -6,6 +6,7 @@ #include "URLNormalizer.hpp" #include "URLFilter.hpp" #include "TypeDetect.hpp" +#include "libcrawler.hpp" #include "ModuleLoader.hpp" @@ -55,18 +56,14 @@ BOOL WINAPI termHandler( DWORD ctrlType ) #endif -#ifdef WITH_LUA -// TODO: should be in the laoding function of libcrawl -#include "tolua.h" -#include "URLLua.hpp" -#endif - static int counter = 0; int main( int /* argc */, char *argv[] ) { try { LuaVM luaVm; + + initialize_libcrawler( (void *)&luaVm ); //Logger::instance( ).openConsoleLog( logDEBUG ); @@ -107,11 +104,6 @@ int main( int /* argc */, char *argv[] ) #endif ModuleLoader<URLNormalizer> urlNormalizers( normalizerModules, CLOSE_DEFERRED, (void *)&luaVm ); -#ifdef WITH_LUA - // TODO: should be in the laoding function of libcrawl - tolua_URL_open( luaVm.handle( ) ); -#endif - // initialize crawler function luaVm.executeFunction( "init" ); |