summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-08 07:38:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-08 07:38:01 (GMT)
commit98f76dbc2eb76d67d8ef5074b5e1c380bb72fe8e (patch)
tree0cf26ece4f06362ae9214f4b900996efbbfbc700 /src/3rdparty
parent75c5bc5f7efd5f7055b689a244147e69733280a4 (diff)
parente231da119daec62c0aa2cee055c539154a0f935d (diff)
downloadQt-98f76dbc2eb76d67d8ef5074b5e1c380bb72fe8e.zip
Qt-98f76dbc2eb76d67d8ef5074b5e1c380bb72fe8e.tar.gz
Qt-98f76dbc2eb76d67d8ef5074b5e1c380bb72fe8e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixes the sqlite driver bug QTBUG-11904 (pointer aliasing) Add test and fix style for the SSE2 implementation of ARGB32 conversion Build fix, the header of QImageData did not declare QImageWriter. SSE2 implementation of convert_ARGB_to_ARGB_PM_inplace for QImage Moved primitive SSE2 painting utilities to qdrawingprimitive_sse2_p.h Move logic for building SIMD extensions to gui.pro Fix text drawing into alpha pixmap with opengl engine
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/sqlite/sqlite3.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index 46d3dfc..27a8d18 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -48449,11 +48449,15 @@ SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){
#endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */
/*
-** Allocate space from a fixed size buffer. Make *pp point to the
-** allocated space. (Note: pp is a char* rather than a void** to
-** work around the pointer aliasing rules of C.) *pp should initially
-** be zero. If *pp is not zero, that means that the space has already
-** been allocated and this routine is a noop.
+** Allocate space from a fixed size buffer and return a pointer to
+** that space. If insufficient space is available, return NULL.
+**
+** The pBuf parameter is the initial value of a pointer which will
+** receive the new memory. pBuf is normally NULL. If pBuf is not
+** NULL, it means that memory space has already been allocated and that
+** this routine should not allocate any new memory. When pBuf is not
+** NULL simply return pBuf. Only allocate new memory space when pBuf
+** is NULL.
**
** nByte is the number of bytes of space needed.
**
@@ -48464,23 +48468,23 @@ SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){
** to allocate. If there is insufficient space in *ppFrom to satisfy the
** request, then increment *pnByte by the amount of the request.
*/
-static void allocSpace(
- char *pp, /* IN/OUT: Set *pp to point to allocated buffer */
+static void *allocSpace(
+ void *pBuf, /* Where return pointer will be stored */
int nByte, /* Number of bytes to allocate */
u8 **ppFrom, /* IN/OUT: Allocate from *ppFrom */
u8 *pEnd, /* Pointer to 1 byte past the end of *ppFrom buffer */
int *pnByte /* If allocation cannot be made, increment *pnByte */
){
assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
- if( (*(void**)pp)==0 ){
- nByte = ROUND8(nByte);
- if( &(*ppFrom)[nByte] <= pEnd ){
- *(void**)pp = (void *)*ppFrom;
- *ppFrom += nByte;
- }else{
- *pnByte += nByte;
- }
+ if( pBuf ) return pBuf;
+ nByte = ROUND8(nByte);
+ if( &(*ppFrom)[nByte] <= pEnd ){
+ pBuf = (void*)*ppFrom;
+ *ppFrom += nByte;
+ }else{
+ *pnByte += nByte;
}
+ return pBuf;
}
/*
@@ -48553,13 +48557,12 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
do {
nByte = 0;
- allocSpace((char*)&p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
- allocSpace((char*)&p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
- allocSpace((char*)&p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
- allocSpace((char*)&p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
- allocSpace((char*)&p->apCsr,
- nCursor*sizeof(VdbeCursor*), &zCsr, zEnd, &nByte
- );
+ p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
+ p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
+ p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
+ p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
+ p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
+ &zCsr, zEnd, &nByte);
if( nByte ){
p->pFree = sqlite3DbMallocZero(db, nByte);
}