summaryrefslogtreecommitdiffstats
path: root/libopkg/xregex.h
diff options
context:
space:
mode:
authorCarsten Schoenert <c.schoenert@gmail.com>2013-11-29 14:19:14 (EST)
committer Paul Barker <paul@paulbarker.me.uk>2013-12-17 16:00:36 (EST)
commitfed9b245150a7faa630f7615302c472b7c68ff3e (patch)
tree1dfc15f3fc9f10b5db423ff9644ac25882d2f8db /libopkg/xregex.h
parent8614cc4cac82328d76ae725c823d7d289137a3a1 (diff)
libopkg: ensure symbol name mangling for C++
Users who use C++ code for theirs application have always to include external C functions with a 'extern "C" { }' assignment. We can take that need from the user by putting thees assignments into the public header files. Signed-off-by: Carsten Schoenert <c.schoenert@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Diffstat (limited to 'libopkg/xregex.h')
-rw-r--r--libopkg/xregex.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopkg/xregex.h b/libopkg/xregex.h
index f67572b..9fc55a1 100644
--- a/libopkg/xregex.h
+++ b/libopkg/xregex.h
@@ -21,11 +21,18 @@
#include <sys/types.h>
#include <regex.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int xregcomp(regex_t *preg, const char *regex, int cflags);
static inline void xregfree(regex_t *preg)
{
regfree(preg);
}
+#ifdef __cplusplus
+}
+#endif
#endif