summaryrefslogtreecommitdiff
path: root/src/common/nullpo.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2015-01-18 13:17:51 -0200
committershennetsind <ind@henn.et>2015-01-18 13:17:51 -0200
commit57789fb70b899eda61206a59283e1a849e544397 (patch)
treee90451205624140f8e47628f39fb2a6a9ec4e30b /src/common/nullpo.c
parentfb5d412a6a9813e1486b7a411ec6b5297209ca51 (diff)
downloadhercules-57789fb70b899eda61206a59283e1a849e544397.tar.gz
hercules-57789fb70b899eda61206a59283e1a849e544397.tar.bz2
hercules-57789fb70b899eda61206a59283e1a849e544397.tar.xz
hercules-57789fb70b899eda61206a59283e1a849e544397.zip
Implementing nullpo interface for plugin use
As proposed in pull request #361 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/nullpo.c')
-rw-r--r--src/common/nullpo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 0333c02ef..e61d52257 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -12,6 +12,8 @@
#include "../common/showmsg.h"
+struct nullpo_interface nullpo_s;
+
/**
* Reports failed assertions or NULL pointers
*
@@ -32,3 +34,12 @@ void assert_report(const char *file, int line, const char *func, const char *tar
ShowError("%s:%d: '%s' in function `%s'\n", file, line, targetname, func);
ShowError("--- end %s ----------------------------------------\n", title);
}
+
+/**
+ *
+ **/
+void nullpo_defaults(void) {
+ nullpo = &nullpo_s;
+
+ nullpo->assert_report = assert_report;
+}