summaryrefslogtreecommitdiff
path: root/src/common/HPMi.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-11 02:17:37 +0200
committerHaru <haru@dotalux.com>2015-08-15 00:51:45 +0200
commite7c2f7d827ad286dc826e483391e64b8ffe2720b (patch)
tree16cab3d257a795c015dfd55c0eaf2447d0f52462 /src/common/HPMi.h
parent5efc9f173f6905da39f3037c278e0e880e82ca35 (diff)
downloadhercules-e7c2f7d827ad286dc826e483391e64b8ffe2720b.tar.gz
hercules-e7c2f7d827ad286dc826e483391e64b8ffe2720b.tar.bz2
hercules-e7c2f7d827ad286dc826e483391e64b8ffe2720b.tar.xz
hercules-e7c2f7d827ad286dc826e483391e64b8ffe2720b.zip
Automatic HPM symbol sharing
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPMi.h')
-rw-r--r--src/common/HPMi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 6f97659f9..bd8d8fe64 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -218,7 +218,9 @@ struct HPMi_interface {
Sql *sql_handle;
};
-#ifndef HERCULES_CORE
+#ifdef HERCULES_CORE
+#define HPM_SYMBOL(n, s) (HPM->share((s), (n)), true)
+#else // ! HERCULES_CORE
HPExport struct HPMi_interface HPMi_s;
HPExport struct HPMi_interface *HPMi;
HPExport void *(*import_symbol) (char *name, unsigned int pID);