diff options
author | shane <shane@noemail.net> | 2008-07-08 22:28:48 +0000 |
---|---|---|
committer | shane <shane@noemail.net> | 2008-07-08 22:28:48 +0000 |
commit | 1fc4129df7b6a304f050a5aadfaed4196fbd014e (patch) | |
tree | 824187b97d42e73531a7ad2bf0b84e3de0c2e1fc /src/table.c | |
parent | c6f66c534914647794b1d2167b2f1e2d92aa0fa0 (diff) | |
download | sqlite-1fc4129df7b6a304f050a5aadfaed4196fbd014e.tar.gz sqlite-1fc4129df7b6a304f050a5aadfaed4196fbd014e.zip |
Added macros to convert between 32-bit ints and 64-bit ptrs to avoid compiler warnings. (CVS 5378)
FossilOrigin-Name: 6cdb6841ff4683e424ef394733da9c24f5602570
Diffstat (limited to 'src/table.c')
-rw-r--r-- | src/table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/table.c b/src/table.c index 563bf637f..1bd1bd19e 100644 --- a/src/table.c +++ b/src/table.c @@ -16,7 +16,7 @@ ** These routines are in a separate files so that they will not be linked ** if they are not used. ** -** $Id: table.c,v 1.35 2008/05/16 04:51:55 danielk1977 Exp $ +** $Id: table.c,v 1.36 2008/07/08 22:28:49 shane Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -147,7 +147,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*)res.nData; + res.azResult[0] = SQLITE_INT_TO_PTR(res.nData); if( (rc&0xff)==SQLITE_ABORT ){ sqlite3_free_table(&res.azResult[1]); if( res.zErrMsg ){ @@ -192,7 +192,7 @@ void sqlite3_free_table( int i, n; azResult--; assert( azResult!=0 ); - n = (int)azResult[0]; + n = SQLITE_PTR_TO_INT(azResult[0]); for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); } sqlite3_free(azResult); } |