diff options
| author | Adam <Adam@drink-coca-cola.info> | 2010-05-06 14:16:59 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-06-18 20:58:55 -0400 |
| commit | 5d437d9ab5988c36def1a78c7d3d3077eb6804e3 (patch) | |
| tree | 2b44daa849e45bdb3fea404d5de76e0af3a8cf17 /include | |
| parent | 031bc4a8b0dc456aca4d70dc260f626b64cd82b3 (diff) | |
Renamed the init_module function to AnopeInit - Some systems have an init_module function outside of Anope which causes a crash if you try to load a non-Anope module
Diffstat (limited to 'include')
| -rw-r--r-- | include/services.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/services.h b/include/services.h index 43e91a21b..ae36f8dbd 100644 --- a/include/services.h +++ b/include/services.h @@ -158,12 +158,12 @@ extern int strncasecmp(const char *, const char *, size_t); /** This definition is used as shorthand for the various classes * and functions needed to make a module loadable by the OS. - * It defines the class factory and external init_module function. + * It defines the class factory and external AnopeInit and AnopeFini functions. */ #ifdef _WIN32 #define MODULE_INIT(x) \ - extern "C" DllExport Module *init_module(const std::string &, const std::string &); \ - extern "C" Module *init_module(const std::string &modname, const std::string &creator) \ + extern "C" DllExport Module *AnopeInit(const std::string &, const std::string &); \ + extern "C" Module *AnopeInit(const std::string &modname, const std::string &creator) \ { \ return new x(modname, creator); \ } \ @@ -177,19 +177,19 @@ extern int strncasecmp(const char *, const char *, size_t); } \ return TRUE; \ } \ - extern "C" DllExport void destroy_module(x *); \ - extern "C" void destroy_module(x *m) \ + extern "C" DllExport void AnopeFini(x *); \ + extern "C" void AnopeFini(x *m) \ { \ delete m; \ } #else #define MODULE_INIT(x) \ - extern "C" DllExport Module *init_module(const std::string &modname, const std::string &creator) \ + extern "C" DllExport Module *AnopeInit(const std::string &modname, const std::string &creator) \ { \ return new x(modname, creator); \ } \ - extern "C" DllExport void destroy_module(x *m) \ + extern "C" DllExport void AnopeFini(x *m) \ { \ delete m; \ } |
