]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove all references to sqlite3_intptr_t. (CVS 5051)
authordrh <drh@noemail.net>
Sun, 27 Apr 2008 18:40:11 +0000 (18:40 +0000)
committerdrh <drh@noemail.net>
Sun, 27 Apr 2008 18:40:11 +0000 (18:40 +0000)
FossilOrigin-Name: 6a94d19747a05df2694d3720f76de3dab3836578

manifest
manifest.uuid
src/build.c
src/func.c
src/insert.c
src/sqliteInt.h
src/table.c
src/vdbeaux.c
src/vdbemem.c
src/vtab.c

index a38444b04628ad39881443736bf3d63377f61339..58dccd98f8dfa3e7493daca07b793306e19d873a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Use\s"(void)"\sfunction\sarguments\sin\sdeclarations\sinstead\sof\s"()".\s\sBoth\sare\nlegal\sbut\ssome\spedantic\scompilers\scomplain\sabout\sthe\slatter.\s\sTicket\s#3086.\s(CVS\s5050)
-D 2008-04-26T13:39:47
+C Remove\sall\sreferences\sto\ssqlite3_intptr_t.\s(CVS\s5051)
+D 2008-04-27T18:40:12
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -89,17 +89,17 @@ F src/btmutex.c 483ced3c52205b04b97df69161fadbf87f4f1ea2
 F src/btree.c 8b2294c64baeee6ae0519e1438c577fd601c02fb
 F src/btree.h 8826591bf54dd35fcf2e67473d5f1bae253861c7
 F src/btreeInt.h dc04ee33d8eb84714b2acdf81336fbbf6e764530
-F src/build.c f56940d7b785cd2f9bcb7e5b6e17157f6feb9c4c
+F src/build.c 8fd7fabaca0d0b307c7d2292c9501b5be13c6ff7
 F src/callback.c 77b302b0d41468dcda78c70e706e5b84577f0fa0
 F src/complete.c 4cf68fd75d60257524cbe74f87351b9848399131
 F src/date.c e41ce4513fb0e359dc678d6bddb4ace135fe365d
 F src/delete.c e4bd53c46969c9fb05cfbba4abc0c93a923f8072
 F src/expr.c 6a6f37005921314b1ae7c3ed4fab03c58fd5e647
 F src/fault.c 83057e86815d473e526f7df0b0108dfdd022ff23
-F src/func.c c9e8c7ff4c45027edee89bde7adbf86a3a3b2afe
+F src/func.c 77a910a1ca7613d291fd0b5cba3be14c02f0dce0
 F src/hash.c 522a8f5a23cf18fe5845afee7263c5be76c25ca2
 F src/hash.h 031cd9f915aff27e12262cb9eb570ac1b8326b53
-F src/insert.c 5208f16ddfc77d9e72bb30041a1d04a18b18a170
+F src/insert.c 9d59bf8eb43ce8399e6f818eaf1612a4c1dfeb2e
 F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2
 F src/legacy.c 8267890e6a0a71f13b680794520999c642299081
 F src/loadext.c 5c20a5afeb154e68d62ed6d9c634add1b21387fd
@@ -134,9 +134,9 @@ F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c be22ec05c8c4a43a95a6ad3b8068542200451e07
 F src/sqlite.h.in 1064c85778f68f501ae91b46cd997084a31e0829
 F src/sqlite3ext.h faacd0e6a81aabee0861c6d7883c9172e74ef5b3
-F src/sqliteInt.h 8b2cd9c4d74deb17a6c2f76970aca7e39d5628b2
+F src/sqliteInt.h 360bd20e5a16e0624db7e2d55d632fbad6f10e19
 F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8
-F src/table.c 2c48c575dd59b3a6c5c306bc55f51a9402cf429a
+F src/table.c 46ccf9b7892a86f57420ae7bac69ecd5e72d26b5
 F src/tclsqlite.c 2877726bf32f7d72ff057b37ed6c93485b667ea1
 F src/test1.c ab25cb2715a9e3f1d91cf99a7280ac7d8dd478e2
 F src/test2.c f0808cc643528b9620e4059ca9bda8346f526121
@@ -173,11 +173,11 @@ F src/vdbe.c 2d75ac15ec69721340f0320e5b2fefbbd1aa2831
 F src/vdbe.h bfd84bda447f39cb599302c7ec85067dae20453c
 F src/vdbeInt.h 05316345da487b0cf540482576f9ae3337d133cd
 F src/vdbeapi.c 0e1b5a808bb0e556f2a975eb7d11fd3153e922bf
-F src/vdbeaux.c e742b6547bd2cf57db4ccdee8e3e326f6276a5de
+F src/vdbeaux.c 7a0d0f021ebc54ae581a4f1ba833a2bee576228e
 F src/vdbeblob.c 554736781ee273a8089c776e96bdb53e66f57ce6
 F src/vdbefifo.c a30c237b2a3577e1415fb6e288cbb6b8ed1e5736
-F src/vdbemem.c 237e61216381998ff71c6431e5e7bd03386f6225
-F src/vtab.c f5e78bf73df3b0c1b53861109c1b2e0800b108cc
+F src/vdbemem.c e2450d6c798f35a30413a79c5fa9b1a24058629d
+F src/vtab.c 13cd7f225c685a71aeba79c0ef521022913f185a
 F src/where.c 85719d58e0f680b5d8239dc6af82b159775d7376
 F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -630,7 +630,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 7f80539225b17a62e4aa09e6d514e3e9e1b22c36
-R d59ff40ec9cfffd3c589ccc9ea8a1338
+P a4149ca317c2fd7ce87b8f23029c3f87a7f4c2e8
+R f54b4828ff50f00d8660564d13a96027
 U drh
-Z 250e76797f2e8fea8feb6705a1e7036b
+Z 3fa96b4da5e32efdd6f210e98bf91fe8
index 56c981d130d42c4fb39aec359f2e9b41c0bddd05..717dfd73f620ad34b9b84a34145599adb4df57f4 100644 (file)
@@ -1 +1 @@
-a4149ca317c2fd7ce87b8f23029c3f87a7f4c2e8
\ No newline at end of file
+6a94d19747a05df2694d3720f76de3dab3836578
\ No newline at end of file
index 65a667655e4c0702b87e40cfb2e96e1b771e18bf..770218f139cf1bfb9afd824aec1b665ad6a8718e 100644 (file)
@@ -22,7 +22,7 @@
 **     COMMIT
 **     ROLLBACK
 **
-** $Id: build.c,v 1.481 2008/04/17 20:59:38 drh Exp $
+** $Id: build.c,v 1.482 2008/04/27 18:40:12 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -2293,7 +2293,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
     regRowid = regIdxKey + pIndex->nColumn;
     j1 = sqlite3VdbeAddOp3(v, OP_IsNull, regIdxKey, 0, pIndex->nColumn);
     j2 = sqlite3VdbeAddOp4(v, OP_IsUnique, iIdx,
-                           0, regRowid, (char*)(sqlite3_intptr_t)regRecord, P4_INT32);
+                           0, regRowid, (char*)regRecord, P4_INT32);
     sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_CONSTRAINT, OE_Abort, 0,
                     "indexed columns are not unique", P4_STATIC);
     sqlite3VdbeJumpHere(v, j1);
index 1c1bbd7e2647e86c86b032941531a16e42ac6e13..10c3baa31a5310d3f12c221e236333e404c96d8a 100644 (file)
@@ -16,7 +16,7 @@
 ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: func.c,v 1.191 2008/03/20 16:30:18 drh Exp $
+** $Id: func.c,v 1.192 2008/04/27 18:40:12 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -867,7 +867,7 @@ static void trimFunc(
   const unsigned char *zIn;         /* Input string */
   const unsigned char *zCharSet;    /* Set of characters to trim */
   int nIn;                          /* Number of bytes in input */
-  sqlite3_intptr_t flags;           /* 1: trimleft  2: trimright  3: trim */
+  int flags;                        /* 1: trimleft  2: trimright  3: trim */
   int i;                            /* Loop counter */
   unsigned char *aLen;              /* Length of each character in zCharSet */
   unsigned char **azChar;           /* Individual characters in zCharSet */
@@ -908,7 +908,7 @@ static void trimFunc(
     }
   }
   if( nChar>0 ){
-    flags = (sqlite3_intptr_t)sqlite3_user_data(context);
+    flags = (int)sqlite3_user_data(context);
     if( flags & 1 ){
       while( nIn>0 ){
         int len;
@@ -1283,7 +1283,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
   for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){
     void *pArg;
     u8 argType = aFuncs[i].argType;
-    pArg = (void*)(sqlite3_intptr_t)argType;
+    pArg = (void*)(int)argType;
     sqlite3CreateFunc(db, aFuncs[i].zName, aFuncs[i].nArg,
         aFuncs[i].eTextRep, pArg, aFuncs[i].xFunc, 0, 0);
     if( aFuncs[i].needCollSeq ){
@@ -1301,7 +1301,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
   sqlite3AttachFunctions(db);
 #endif
   for(i=0; i<sizeof(aAggs)/sizeof(aAggs[0]); i++){
-    void *pArg = (void*)(sqlite3_intptr_t)aAggs[i].argType;
+    void *pArg = (void*)(int)aAggs[i].argType;
     sqlite3CreateFunc(db, aAggs[i].zName, aAggs[i].nArg, SQLITE_UTF8, 
         pArg, 0, aAggs[i].xStep, aAggs[i].xFinalize);
     if( aAggs[i].needCollSeq ){
index e090e1f76a6cb708b7a96862572b9df2da314671..5a97a8a18cade3bf9e9d1d7daee15c4d0482cb51 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle INSERT statements in SQLite.
 **
-** $Id: insert.c,v 1.236 2008/04/11 15:36:03 drh Exp $
+** $Id: insert.c,v 1.237 2008/04/27 18:40:12 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -1193,7 +1193,7 @@ void sqlite3GenerateConstraintChecks(
     regR = sqlite3GetTempReg(pParse);
     sqlite3VdbeAddOp2(v, OP_SCopy, regRowid-hasTwoRowids, regR);
     j3 = sqlite3VdbeAddOp4(v, OP_IsUnique, baseCur+iCur+1, 0,
-                           regR, (char*)(sqlite3_intptr_t)aRegIdx[iCur],
+                           regR, (char*)aRegIdx[iCur],
                            P4_INT32);
 
     /* Generate code that executes if the new index entry is not unique */
index 9698d4a284d38bd53eebbcaf0ebef1aa5427e31b..01a070b96e9d6aa13dbac2015f01db405783cb3e 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.695 2008/04/24 19:15:10 shane Exp $
+** @(#) $Id: sqliteInt.h,v 1.696 2008/04/27 18:40:12 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
 /* Needed for various definitions... */
 #define _GNU_SOURCE
 
-/*
-** Include standard header files as necessary
-*/
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
-/*
-** If possible, use the C99 intptr_t type to define an integral type of
-** equivalent size to a pointer.  (Technically it's >= sizeof(void *), but
-** practically it's == sizeof(void *)).  We fall back to an int if this type
-** isn't defined.
-*/
-#ifdef HAVE_INTPTR_T
-  typedef intptr_t sqlite3_intptr_t;
-#else
-  typedef int sqlite3_intptr_t;
-#endif
-
 /*
 ** A macro used to aid in coverage testing.  When doing coverage
 ** testing, the condition inside the argument must be evaluated 
index eac9168dd4a9a7e9cd1c91a3eeb3010400ee09cc..88a96ee6fd31d200fd56f637426912dafe8bfb0d 100644 (file)
@@ -145,7 +145,7 @@ int sqlite3_get_table(
   res.azResult[0] = 0;
   rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
   assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
-  res.azResult[0] = (char*)(sqlite3_intptr_t)res.nData;
+  res.azResult[0] = (char*)res.nData;
   if( (rc&0xff)==SQLITE_ABORT ){
     sqlite3_free_table(&res.azResult[1]);
     if( res.zErrMsg ){
@@ -187,10 +187,10 @@ void sqlite3_free_table(
   char **azResult            /* Result returned from from sqlite3_get_table() */
 ){
   if( azResult ){
-    sqlite3_intptr_t i, n;
+    int i, n;
     azResult--;
     assert( azResult!=0 );
-    n = (sqlite3_intptr_t)azResult[0];
+    n = (int)azResult[0];
     for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }
     sqlite3_free(azResult);
   }
index 3c979b6a4d35c26a675a641563d2095aa67b1860..38dd344d64a9273d7886a281bd045cab2895c390 100644 (file)
@@ -14,7 +14,7 @@
 ** to version 2.8.7, all this code was combined into the vdbe.c source file.
 ** But that file was getting too big so this subroutines were split out.
 **
-** $Id: vdbeaux.c,v 1.379 2008/04/24 19:15:11 shane Exp $
+** $Id: vdbeaux.c,v 1.380 2008/04/27 18:40:12 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -536,7 +536,7 @@ void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
   if( n==P4_INT32 ){
     /* Note: this cast is safe, because the origin data point was an int
     ** that was cast to a (const char *). */
-    pOp->p4.i = (int)(sqlite3_intptr_t)zP4;
+    pOp->p4.i = (int)zP4;
     pOp->p4type = n;
   }else if( zP4==0 ){
     pOp->p4.p = 0;
index 43ba67db074edda6683db7309c8aa0945defd0fd..f45f38426321f82db428dee0db463350ba42087b 100644 (file)
@@ -893,7 +893,7 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
   expandBlob(pVal);
   if( pVal->flags&MEM_Str ){
     sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
-    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(sqlite3_intptr_t)pVal->z) ){
+    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(int)pVal->z) ){
       assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
       if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
         return 0;
@@ -903,7 +903,7 @@ const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
   }else{
     assert( (pVal->flags&MEM_Blob)==0 );
     sqlite3VdbeMemStringify(pVal, enc);
-    assert( 0==(1&(sqlite3_intptr_t)pVal->z) );
+    assert( 0==(1&(int)pVal->z) );
   }
   assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
               || pVal->db->mallocFailed );
index e3a9b8bb1d21bf2cfcd9503f99618682edceea53..281716262e99cee2c3845a8c173c5ea77e910416 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to help implement virtual tables.
 **
-** $Id: vtab.c,v 1.66 2008/04/10 18:35:22 drh Exp $
+** $Id: vtab.c,v 1.67 2008/04/27 18:40:12 drh Exp $
 */
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 #include "sqliteInt.h"
@@ -618,7 +618,7 @@ int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab)
 **
 ** The array is cleared after invoking the callbacks. 
 */
-static void callFinaliser(sqlite3 *db, sqlite3_intptr_t offset){
+static void callFinaliser(sqlite3 *db, int offset){
   int i;
   if( db->aVTrans ){
     for(i=0; i<db->nVTrans && db->aVTrans[i]; i++){
@@ -671,7 +671,7 @@ int sqlite3VtabSync(sqlite3 *db, int rc2){
 ** sqlite3.aVTrans array. Then clear the array itself.
 */
 int sqlite3VtabRollback(sqlite3 *db){
-  callFinaliser(db, (sqlite3_intptr_t)(&((sqlite3_module *)0)->xRollback));
+  callFinaliser(db, offsetof(sqlite3_module,xRollback));
   return SQLITE_OK;
 }
 
@@ -680,7 +680,7 @@ int sqlite3VtabRollback(sqlite3 *db){
 ** sqlite3.aVTrans array. Then clear the array itself.
 */
 int sqlite3VtabCommit(sqlite3 *db){
-  callFinaliser(db, (sqlite3_intptr_t)(&((sqlite3_module *)0)->xCommit));
+  callFinaliser(db, offsetof(sqlite3_module,xCommit));
   return SQLITE_OK;
 }