Add extern C to upb_alloc_global

pull/13171/head
Esun Kim 5 years ago
parent 94d74ce700
commit 98ae7806e9
  1. 8
      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(). */ /* The global allocator used by upb. Uses the standard malloc()/free(). */
#ifdef __cplusplus
extern "C" {
#endif
extern upb_alloc upb_alloc_global; extern upb_alloc upb_alloc_global;
#ifdef __cplusplus
} /* extern "C" */
#endif
/* Functions that hard-code the global malloc. /* Functions that hard-code the global malloc.
* *
* We still get benefit because we can put custom logic into our global * We still get benefit because we can put custom logic into our global

Loading…
Cancel
Save