summaryrefslogtreecommitdiff
path: root/src/common/plugins.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
commit49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch)
tree4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/common/plugins.h
parentfda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff)
downloadhercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/plugins.h')
-rw-r--r--src/common/plugins.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/plugins.h b/src/common/plugins.h
index b4235e72d..9d93bcaa6 100644
--- a/src/common/plugins.h
+++ b/src/common/plugins.h
@@ -17,7 +17,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define DLL_OPEN(x) LoadLibrary(x)
- #define DLL_SYM(x,y,z) (FARPROC)(x) = GetProcAddress(y,z)
+ #define DLL_SYM(x,y) GetProcAddress(x,y)
#define DLL_CLOSE(x) FreeLibrary(x)
char *DLL_ERROR(void);
@@ -28,7 +28,7 @@
#include <dlfcn.h>
#define DLL_OPEN(x) dlopen(x,RTLD_NOW)
- #define DLL_SYM(x,y,z) (x) = (void *)dlsym(y,z)
+ #define DLL_SYM(x,y) dlsym(x,y)
#define DLL_CLOSE(x) dlclose(x)
#define DLL_ERROR dlerror
@@ -60,7 +60,8 @@ int register_plugin_event(Plugin_Event_Func* func, char* name);
int plugin_event_trigger(char* name);
int export_symbol(void* var, size_t offset);
-#define EXPORT_SYMBOL(s) export_symbol((s), -1);
+#define EXPORT_SYMBOL(s,o) export_symbol((void*)(s),(o));
+#define EXPORT_SYMBOL2(s) EXPORT_SYMBOL((s), -1);
Plugin* plugin_open(const char* filename);
void plugin_load(const char* filename);