diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-01-13 16:39:10 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-17 17:59:29 +0100 |
commit | e465a8c58cef94029b11bbb5e53c89833d85d96d (patch) | |
tree | 2cf279a7098f056b01ade1f19b2f66d57e3fbdfd /src/corelib | |
parent | 9e9f7a482abbfc862c9a5cc292139a36b5f25700 (diff) |
Don't use qMalloc/qFree in non-inline code
This propagates changes in b08daaedd45457b775cb90d2c2650510daff1c8d to
this branch.
Change-Id: I3b72f53c7b24d27075ea8593c347b504bfd8f581
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qarraydata.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp index 6a5632a47f..275fbc1ed5 100644 --- a/src/corelib/tools/qarraydata.cpp +++ b/src/corelib/tools/qarraydata.cpp @@ -41,6 +41,8 @@ #include <QtCore/qarraydata.h> +#include <stdlib.h> + QT_BEGIN_NAMESPACE const QArrayData QArrayData::shared_null = { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, 0 }; @@ -70,7 +72,7 @@ QArrayData *QArrayData::allocate(size_t objectSize, size_t alignment, if (!(options & RawData)) allocSize += (alignment - Q_ALIGNOF(QArrayData)); - QArrayData *header = static_cast<QArrayData *>(qMalloc(allocSize)); + QArrayData *header = static_cast<QArrayData *>(::malloc(allocSize)); Q_CHECK_PTR(header); if (header) { quintptr data = (quintptr(header) + sizeof(QArrayData) + alignment - 1) @@ -97,7 +99,7 @@ void QArrayData::deallocate(QArrayData *data, size_t objectSize, if (data == &qt_array_unsharable_empty) return; - qFree(data); + ::free(data); } QT_END_NAMESPACE |