C++ support.
[yaz-moved-to-github.git] / include / wrbuf.h
index 9e8d15e..4c011e3 100644 (file)
 
 #include <yconfig.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct wrbuf
 {
     char *buf;
@@ -50,4 +54,8 @@ int wrbuf_write(WRBUF b, char *buf, int size);
     (((b)->pos >= (b)->size ? wrbuf_grow(b, 1) : 0),  \
     (b)->buf[(b)->pos++] = (c), 0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif