summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-plugin.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-03 15:42:50 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:54 +0100
commitbbc7fc4588ba23bdcdb585f340d83dbbf30b994f (patch)
treeb806b588e544d27d3a76110899cdbdc90f567562 /ctl-lib/ctl-plugin.h
parent25b02ddcd940fbf2f19d0012309d7945c389861c (diff)
Correctly export symbols for C++
Change-Id: I87eb6b5cc7208caaabbc3c2f3b6636d600c60370 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-plugin.h')
-rw-r--r--ctl-lib/ctl-plugin.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctl-lib/ctl-plugin.h b/ctl-lib/ctl-plugin.h
index 2adfbef..f4a0e7b 100644
--- a/ctl-lib/ctl-plugin.h
+++ b/ctl-lib/ctl-plugin.h
@@ -20,6 +20,9 @@
#ifndef _CTL_PLUGIN_INCLUDE_
#define _CTL_PLUGIN_INCLUDE_
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -240,4 +243,8 @@ typedef int (*Lua2cWrapperT) (void*luaHandle, char *funcname, Lua2cFunctionT cal
int lua2c_ ## funcname (void* luaState){return((*Lua2cWrap)(luaState, MACRO_STR_VALUE(funcname), funcname));};\
static int funcname (CtlSourceT* source, json_object* argsJ, json_object** responseJ)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CTL_PLUGIN_INCLUDE_ */