Bug 1400096 - Annotate mozmemory_wrap.c windows functions as MOZ_MEMORY_API. r=njn
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 15 Sep 2017 10:12:24 +0900
changeset 430588 092857175e36c1c9c0d8d74436f432dc57deba11
parent 430587 6cf651d919d1aa049d0b88c1ca8f91c0c33ee56b
child 430589 09aa9fae62808374cf8d78e01a8e7ac8c428b3d2
push id7768
push userryanvm@gmail.com
push dateSat, 16 Sep 2017 16:13:49 +0000
treeherdermozilla-beta@3b375d85383a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1400096
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1400096 - Annotate mozmemory_wrap.c windows functions as MOZ_MEMORY_API. r=njn It happens to work because of mozglue.def, but we might as well have the right annotations (which will also make things correct when building this file to C++)
memory/build/mozmemory_wrap.c
--- a/memory/build/mozmemory_wrap.c
+++ b/memory/build/mozmemory_wrap.c
@@ -143,24 +143,24 @@ asprintf_impl(char **str, const char *fm
 
 #ifdef XP_WIN
 #include <wchar.h>
 
 /*
  *  We also need to provide our own impl of wcsdup so that we don't ask
  *  the CRT for memory from its heap (which will then be unfreeable).
  */
-wchar_t *
-wcsdup_impl(const wchar_t *src)
+MOZ_MEMORY_API wchar_t*
+wcsdup_impl(const wchar_t* src)
 {
   size_t len = wcslen(src);
   wchar_t *dst = (wchar_t*) malloc_impl((len + 1) * sizeof(wchar_t));
   if (dst)
     wcsncpy(dst, src, len + 1);
   return dst;
 }
 
-void *
+MOZ_MEMORY_API void*
 _aligned_malloc(size_t size, size_t alignment)
 {
   return memalign_impl(alignment, size);
 }
 #endif /* XP_WIN */