Bug 1423109 - Use MOZ_{BEGIN,END}_EXTERN_C in mozalloc.h. r?njn draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 05 Dec 2017 17:04:45 +0900
changeset 707454 8691a1eb77a811f48a17d949174bb2eb99f1f13c
parent 707453 c6c8362d229c775ef032520ad59ff7e762103d42
child 707460 fb6353b8fc8260b6727599b161646ab940ff7c18
push id92109
push userbmo:mh+mozilla@glandium.org
push dateTue, 05 Dec 2017 08:06:25 +0000
reviewersnjn
bugs1423109
milestone59.0a1
Bug 1423109 - Use MOZ_{BEGIN,END}_EXTERN_C in mozalloc.h. r?njn
memory/mozalloc/mozalloc.h
--- 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