summaryrefslogtreecommitdiffstats
path: root/polyp/cdecl.h
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/cdecl.h')
-rw-r--r--polyp/cdecl.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/polyp/cdecl.h b/polyp/cdecl.h
new file mode 100644
index 00000000..39880a47
--- /dev/null
+++ b/polyp/cdecl.h
@@ -0,0 +1,21 @@
+#ifndef foocdeclhfoo
+#define foocdeclhfoo
+
+/** \file
+ * C++ compatibility support */
+
+#ifdef __cplusplus
+/** If using C++ this macro enables C mode, otherwise does nothing */
+#define PA_C_DECL_BEGIN extern "C" {
+/** If using C++ this macros switches back to C++ mode, otherwise does nothing */
+#define PA_C_DECL_END }
+
+#else
+/** If using C++ this macro enables C mode, otherwise does nothing */
+#define PA_C_DECL_BEGIN
+/** If using C++ this macros switches back to C++ mode, otherwise does nothing */
+#define PA_C_DECL_END
+
+#endif
+
+#endif