[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-52.7.3esr-8.0-1] Bug 1389965 Redefine macros to inline functions to fix MinGW build r=jfkthame



commit 5a3775152eac3be01e3e947214748e33712bec68
Author: Tom Ritter <tom@xxxxxxxxxxx>
Date:   Mon Oct 2 12:46:26 2017 -0500

    Bug 1389965 Redefine macros to inline functions to fix MinGW build r=jfkthame
    
    MozReview-Commit-ID: 55Rr9Tk2tdD
---
 gfx/graphite2/src/MozGrMalloc.h | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gfx/graphite2/src/MozGrMalloc.h b/gfx/graphite2/src/MozGrMalloc.h
index acaae1236c49..0a853ab5d322 100644
--- a/gfx/graphite2/src/MozGrMalloc.h
+++ b/gfx/graphite2/src/MozGrMalloc.h
@@ -12,8 +12,19 @@
 
 #include "mozilla/mozalloc.h"
 
-#define malloc moz_xmalloc
-#define calloc moz_xcalloc
-#define realloc moz_xrealloc
+inline void* malloc(size_t size)
+{
+    return moz_xmalloc(size);
+}
+
+inline void* calloc(size_t nmemb, size_t size)
+{
+    return moz_xcalloc(nmemb, size);
+}
+
+inline void* realloc(void *ptr, size_t size)
+{
+    return moz_xrealloc(ptr, size);
+}
 
 #endif // MOZ_GR_MALLOC_H



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits