From 2e41f43ace799691e42a8a2cdd01be44fe6bc1aa Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Wed, 26 Nov 2008 22:13:01 +0000 Subject: A few more Win32 fixes, Anope 1.9 compiles and runs under Windows now. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1799 5417fbe8-f217-4b02-8779-1006273d7864 --- include/extern.h | 14 ++------------ include/services.h | 11 +++++++++-- 2 files changed, 11 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/extern.h b/include/extern.h index eb29fce8a..f1b86c7c6 100644 --- a/include/extern.h +++ b/include/extern.h @@ -15,18 +15,8 @@ #ifndef EXTERN_H #define EXTERN_H -#ifndef _WIN32 -#define E extern -#define EI extern -#else -#ifndef MODULE_COMPILE -#define E extern __declspec(dllexport) -#define EI extern __declspec(dllimport) -#else -#define E extern __declspec(dllimport) -#define EI extern __declspec(dllexport) -#endif -#endif +#define E extern CoreExport +#define EI extern DllExport #include "slist.h" diff --git a/include/services.h b/include/services.h index 163d620fa..782f46e0e 100644 --- a/include/services.h +++ b/include/services.h @@ -305,7 +305,7 @@ class CoreExport ModuleException : public CoreException /** Class with the ability to be extended with key:value pairs. * Thanks to InspIRCd for this. */ -class Extensible +class CoreExport Extensible { private: std::map Extension_Items; @@ -360,7 +360,14 @@ class Extensible * you provide a nonexistent key (case is important) then the function will return false. * @return Returns true on success. */ - bool Shrink(const std::string &key); + bool Shrink(const std::string &key) + { + /* map::size_type map::erase( const key_type& key ); + * returns the number of elements removed, std::map + * is single-associative so this should only be 0 or 1 + */ + return this->Extension_Items.erase(key); + } /** Get an extension item. * -- cgit