summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--upb/upb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/upb/upb.h b/upb/upb.h
index 11aa38c..79c19d2 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -159,8 +159,16 @@ UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr) {
/* The global allocator used by upb. Uses the standard malloc()/free(). */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern upb_alloc upb_alloc_global;
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
/* Functions that hard-code the global malloc.
*
* We still get benefit because we can put custom logic into our global
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback