[PATCH v2 02/14] util: Make string-util.h C++-compatible

Subject: [PATCH v2 02/14] util: Make string-util.h C++-compatible

Date: Tue, 29 Jul 2014 12:48:00 -0400

To: notmuch@notmuchmail.org

Cc:

From: Austin Clements


---
 util/string-util.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/util/string-util.h b/util/string-util.h
index 8a3ad19..ccad17f 100644
--- a/util/string-util.h
+++ b/util/string-util.h
@@ -3,6 +3,10 @@
 
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* like strtok(3), but without state, and doesn't modify s.  Return
  * value is indicated by pointer and length, not null terminator.
  *
@@ -57,4 +61,8 @@ int
 parse_boolean_term (void *ctx, const char *str,
 		    char **prefix_out, char **term_out);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
2.0.0


Thread: