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/func.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/func.c')
-rw-r--r-- | src/func.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/func.c b/src/func.c index 014d0af7f..47709caab 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.194 2008/06/18 15:34:10 drh Exp $ +** $Id: func.c,v 1.195 2008/07/08 22:28:49 shane Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -908,7 +908,7 @@ static void trimFunc( } } if( nChar>0 ){ - flags = (int)sqlite3_user_data(context); + flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context)); if( flags & 1 ){ while( nIn>0 ){ int len; @@ -1286,7 +1286,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){ for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){ void *pArg; u8 argType = aFuncs[i].argType; - pArg = (void*)(int)argType; + pArg = SQLITE_INT_TO_PTR(argType); sqlite3CreateFunc(db, aFuncs[i].zName, aFuncs[i].nArg, aFuncs[i].eTextRep, pArg, aFuncs[i].xFunc, 0, 0); if( aFuncs[i].needCollSeq ){ @@ -1304,7 +1304,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){ sqlite3AttachFunctions(db); #endif for(i=0; i<sizeof(aAggs)/sizeof(aAggs[0]); i++){ - void *pArg = (void*)(int)aAggs[i].argType; + void *pArg = SQLITE_INT_TO_PTR(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 ){ |