Bug 1423109 - Use MOZ_{BEGIN,END}_EXTERN_C in mozalloc.h. r?njn
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -38,19 +38,17 @@
#if defined(MOZ_ALWAYS_INLINE_EVEN_DEBUG)
# define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
#elif defined(HAVE_FORCEINLINE)
# define MOZALLOC_INLINE __forceinline
#else
# define MOZALLOC_INLINE inline
#endif
-#if defined(__cplusplus)
-extern "C" {
-#endif /* ifdef __cplusplus */
+MOZ_BEGIN_EXTERN_C
/*
* We need to use malloc_impl and free_impl in this file when they are
* defined, because of how mozglue.dll is linked on Windows, where using
* malloc/free would end up using the symbols from the MSVCRT instead of
* ours.
*/
#ifndef free_impl
@@ -115,19 +113,17 @@ MFBT_API void* moz_xmemalign(size_t boun
#if defined(HAVE_VALLOC)
MFBT_API void* moz_xvalloc(size_t size)
MOZ_ALLOCATOR;
#endif /* if defined(HAVE_VALLOC) */
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* ifdef __cplusplus */
+MOZ_END_EXTERN_C
#ifdef __cplusplus
/*
* We implement the default operators new/delete as part of
* libmozalloc, replacing their definitions in libstdc++. The
* operator new* definitions in libmozalloc will never return a NULL