[svn-commits] file: branch file/astdb-sqlite3 r78696 - /team/file/astdb-sqlite3/main/sqlite3.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Aug 8 19:27:42 CDT 2007
Author: file
Date: Wed Aug 8 19:27:39 2007
New Revision: 78696
URL: http://svn.digium.com/view/asterisk?view=rev&rev=78696
Log:
Voila, builds under 64-bit.
Modified:
team/file/astdb-sqlite3/main/sqlite3.c
Modified: team/file/astdb-sqlite3/main/sqlite3.c
URL: http://svn.digium.com/view/asterisk/team/file/astdb-sqlite3/main/sqlite3.c?view=diff&rev=78696&r1=78695&r2=78696
==============================================================================
--- team/file/astdb-sqlite3/main/sqlite3.c (original)
+++ team/file/astdb-sqlite3/main/sqlite3.c Wed Aug 8 19:27:39 2007
@@ -4545,7 +4545,7 @@
SQLITE_PRIVATE void *sqlite3OsMalloc(int);
SQLITE_PRIVATE void *sqlite3OsRealloc(void *, int);
SQLITE_PRIVATE void sqlite3OsFree(void *);
-SQLITE_PRIVATE int sqlite3OsAllocationSize(void *);
+//SQLITE_PRIVATE int sqlite3OsAllocationSize(void *);
SQLITE_PRIVATE void *sqlite3OsDlopen(const char*);
SQLITE_PRIVATE void *sqlite3OsDlsym(void*, const char*);
SQLITE_PRIVATE int sqlite3OsDlclose(void*);
@@ -6222,7 +6222,7 @@
SQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *, CollSeq *);
SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *, const char *);
SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
-SQLITE_PRIVATE void sqlite3Utf16Substr(sqlite3_context *,int,sqlite3_value **);
+//SQLITE_PRIVATE void sqlite3Utf16Substr(sqlite3_context *,int,sqlite3_value **);
SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8);
SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8);
@@ -6341,9 +6341,9 @@
#define sqlite3ExprSetHeight(x)
#endif
-SQLITE_PRIVATE u32 sqlite3Get2byte(const u8*);
+//SQLITE_PRIVATE u32 sqlite3Get2byte(const u8*);
SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
-SQLITE_PRIVATE void sqlite3Put2byte(u8*, u32);
+//SQLITE_PRIVATE void sqlite3Put2byte(u8*, u32);
SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
#ifdef SQLITE_SSE
@@ -13074,7 +13074,7 @@
free(p);
}
/* Never actually used, but needed for the linker */
-SQLITE_PRIVATE int sqlite3GenericAllocationSize(void *p){ return 0; }
+//SQLITE_PRIVATE int sqlite3GenericAllocationSize(void *p){ return 0; }
#endif
/*
@@ -22925,7 +22925,7 @@
SQLITE_PRIVATE int sqlite3BtreeInitPage(MemPage *pPage, MemPage *pParent);
SQLITE_PRIVATE void sqlite3BtreeParseCellPtr(MemPage*, u8*, CellInfo*);
SQLITE_PRIVATE void sqlite3BtreeParseCell(MemPage*, int, CellInfo*);
-SQLITE_PRIVATE u8 *sqlite3BtreeFindCell(MemPage *pPage, int iCell);
+//SQLITE_PRIVATE u8 *sqlite3BtreeFindCell(MemPage *pPage, int iCell);
SQLITE_PRIVATE int sqlite3BtreeRestoreOrClearCursorPosition(BtCursor *pCur);
SQLITE_PRIVATE void sqlite3BtreeGetTempCursor(BtCursor *pCur, BtCursor *pTempCur);
SQLITE_PRIVATE void sqlite3BtreeReleaseTempCursor(BtCursor *pCur);
@@ -23339,11 +23339,13 @@
*/
#define findCell(pPage, iCell) \
((pPage)->aData + get2byte(&(pPage)->aData[(pPage)->cellOffset+2*(iCell)]))
+/*
SQLITE_PRIVATE u8 *sqlite3BtreeFindCell(MemPage *pPage, int iCell){
assert( iCell>=0 );
assert( iCell<get2byte(&pPage->aData[pPage->hdrOffset+3]) );
return findCell(pPage, iCell);
}
+*/
/*
** This a more complex version of sqlite3BtreeFindCell() that works for
@@ -30255,7 +30257,7 @@
expandBlob(pVal);
if( pVal->flags&MEM_Str ){
sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
- if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(int)pVal->z[0]) ){
+ if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&(long)pVal->z) ){
assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
return 0;
@@ -48768,7 +48770,7 @@
}
}
if( nChar>0 ){
- flags = (int)sqlite3_user_data(context);
+ flags = (int)(long)sqlite3_user_data(context);
if( flags & 1 ){
while( nIn>0 ){
int len;
@@ -49259,7 +49261,7 @@
if( argType==0xff ){
pArg = db;
}else{
- pArg = (void*)(int)argType;
+ pArg = (void*)(long)argType;
}
sqlite3CreateFunc(db, aFuncs[i].zName, aFuncs[i].nArg,
aFuncs[i].eTextRep, pArg, aFuncs[i].xFunc, 0, 0);
@@ -49278,7 +49280,7 @@
sqlite3AttachFunctions(db);
#endif
for(i=0; i<sizeof(aAggs)/sizeof(aAggs[0]); i++){
- void *pArg = (void*)(int)aAggs[i].argType;
+ void *pArg = (void*)(long)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 ){
@@ -57378,7 +57380,7 @@
rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
if( res.azResult ){
assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
- res.azResult[0] = (char*)res.nData;
+ res.azResult[0] = (char*)(long)res.nData;
}
if( (rc&0xff)==SQLITE_ABORT ){
sqlite3_free_table(&res.azResult[1]);
@@ -57423,7 +57425,7 @@
int i, n;
azResult--;
if( azResult==0 ) return;
- n = (int)azResult[0];
+ n = (int)(long)azResult[0];
for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }
sqlite3_free(azResult);
}
More information about the svn-commits
mailing list