add extern "C" to properties.h

Sat, 19 Oct 2024 13:43:10 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 19 Oct 2024 13:43:10 +0200
changeset 932
484dab606292
parent 931
be71809e69d1
child 933
40bf2f212d2a

add extern "C" to properties.h

src/cx/properties.h file | annotate | diff | comparison | revisions
--- a/src/cx/properties.h	Sat Oct 19 13:21:58 2024 +0200
+++ b/src/cx/properties.h	Sat Oct 19 13:43:10 2024 +0200
@@ -43,6 +43,10 @@
 
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct cx_properties_config_s {
     /**
      * The key/value delimiter that shall be used.
@@ -268,21 +272,21 @@
  * @param target a string buffer where the read data shall be stored
  * @return zero on success, non-zero when reading data failed
  */
- __attribute__((__nonnull__))
+__attribute__((__nonnull__))
 typedef int(*cx_properties_read_func)(
         CxProperties *prop,
         CxPropertiesSource *src,
         cxstring *target
 );
 
- /**
-  * A function that may initialize additional memory for the source.
-  *
-  * @param prop the properties interface that wants to read from the source
-  * @param src the source
-  * @return zero when initialization was successful, non-zero otherwise
-  */
- __attribute__((__nonnull__))
+/**
+ * A function that may initialize additional memory for the source.
+ *
+ * @param prop the properties interface that wants to read from the source
+ * @param src the source
+ * @return zero when initialization was successful, non-zero otherwise
+ */
+__attribute__((__nonnull__))
 typedef int(*cx_properties_read_init_func)(
         CxProperties *prop,
         CxPropertiesSource *src
@@ -532,4 +536,8 @@
         CxPropertiesSource source
 );
 
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
 #endif // UCX_PROPERTIES

mercurial