summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
authorEsun Kim <veblush@google.com>2019-07-31 11:18:43 -0700
committerEsun Kim <veblush@google.com>2019-07-31 11:18:43 -0700
commit98ae7806e9c2187deeb25ee6d9fb67d437489017 (patch)
tree65dd4acb6b257cc6f095b45c0e16bfed25981320 /upb
parent94d74ce700dbdacdcec23513a91b2127e6d7df42 (diff)
Add extern C to upb_alloc_global
Diffstat (limited to 'upb')
-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