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 <ogoffart@woboq.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Thiago Macieira 2012-05-03 17:22:07 +02:00 committed by Qt by Nokia
parent 32804a5b16
commit d839564c94

View File

@ -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);