From d839564c94a73e3dd2816a8c2196e612e1f5cb79 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 May 2012 17:22:07 +0200 Subject: Make sure we export the non-inline qMalloc & friends functions If QtCore is built with Qt 5.0 API, the Q_CORE_EXPORT does not appear anywhere and these functions wouldn't get exported, despite being defined. So make sure that they get the Q_CORE_EXPORT attribute. Change-Id: I0684ea1b9ad634c13dca12c97683032e44f6a290 Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell --- src/corelib/global/qmalloc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp index a6d3b4f418..4cd1b485df 100644 --- a/src/corelib/global/qmalloc.cpp +++ b/src/corelib/global/qmalloc.cpp @@ -50,6 +50,16 @@ QT_BEGIN_NAMESPACE +#if !QT_DEPRECATED_SINCE(5, 0) +// Make sure they're defined to be exportedgit +Q_CORE_EXPORT void *qMalloc(size_t size) Q_ALLOC_SIZE(1); +Q_CORE_EXPORT void qFree(void *ptr); +Q_CORE_EXPORT void *qRealloc(void *ptr, size_t size) Q_ALLOC_SIZE(2); +Q_CORE_EXPORT void *qMemCopy(void *dest, const void *src, size_t n); +Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n); +#endif + + void *qMalloc(size_t size) { return ::malloc(size); -- cgit v1.2.3