summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml/qxmlstream.g
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-03-22 21:44:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-31 16:46:40 +0200
commit47728445a5e7317ed2123a8824c54a012eeee142 (patch)
tree762385979cf489c0cb92a061ed7bde3cd077c851 /src/corelib/xml/qxmlstream.g
parentad921347f701ea7f732633c9c584be9300317537 (diff)
Remove all calls to, and deprecate qMalloc, qRealloc and qFree.
Callers should just call the standard allocation functions directly. Adding an extra function call onto all basic memory management for the sake of making it instrumentable in rare cases isn't really fair to everyone else. What's more, this wasn't completely reliable, as not everything was using them in a number of places. Memory management can still be overridden using tricks like LD_PRELOAD if needed. Their aligned equivilents cannot be deprecated, as no standard equivilents exist, although investigation into posix_memalign(3) is a possibility for the future. Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/xml/qxmlstream.g')
-rw-r--r--src/corelib/xml/qxmlstream.g4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g
index 87a10003d3..a1d1e84b51 100644
--- a/src/corelib/xml/qxmlstream.g
+++ b/src/corelib/xml/qxmlstream.g
@@ -152,12 +152,12 @@ template <typename T> class QXmlStreamSimpleStack {
int tos, cap;
public:
inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){}
- inline ~QXmlStreamSimpleStack(){ if (data) qFree(data); }
+ inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
inline void reserve(int extraCapacity) {
if (tos + extraCapacity + 1 > cap) {
cap = qMax(tos + extraCapacity + 1, cap << 1 );
- data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T)));
+ data = reinterpret_cast<T *>(realloc(data, cap * sizeof(T)));
Q_CHECK_PTR(data);
}
}