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++)
--- 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 */