/ Check-in [6c9be972]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Address some minor 32/64 bit issues. (CVS 1932)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6c9be972c1c289b657ba87db8db08fceb89b0171
User & Date: drh 2004-09-02 15:53:57
Context
2004-09-02
16:36
Update version number and documentation for version 3.0.6. (CVS 1933) check-in: 67370926 user: drh tags: trunk
15:53
Address some minor 32/64 bit issues. (CVS 1932) check-in: 6c9be972 user: drh tags: trunk
15:49
Fix a bug in the pagesize test script. (CVS 1931) check-in: 1cf05bc6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/func.c.

    12     12   ** This file contains the C functions that implement various SQL
    13     13   ** functions of SQLite.  
    14     14   **
    15     15   ** There is only one exported symbol in this file - the function
    16     16   ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
    17     17   ** All other code has file scope.
    18     18   **
    19         -** $Id: func.c,v 1.81 2004/08/31 00:52:37 drh Exp $
           19  +** $Id: func.c,v 1.82 2004/09/02 15:53:57 drh Exp $
    20     20   */
    21     21   #include <ctype.h>
    22     22   #include <math.h>
    23     23   #include <stdlib.h>
    24     24   #include <assert.h>
    25     25   #include "sqliteInt.h"
    26     26   #include "vdbeInt.h"
................................................................................
    40     40   ){
    41     41     int i;
    42     42     int mask;    /* 0 for min() or 0xffffffff for max() */
    43     43     int iBest;
    44     44     CollSeq *pColl;
    45     45   
    46     46     if( argc==0 ) return;
    47         -  mask = (int)sqlite3_user_data(context);
           47  +  mask = sqlite3_user_data(context)==0 ? 0 : -1;
    48     48     pColl = sqlite3GetFuncCollSeq(context);
    49     49     assert( pColl );
    50     50     assert( mask==-1 || mask==0 );
    51     51     iBest = 0;
    52     52     if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
    53     53     for(i=1; i<argc; i++){
    54     54       if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.257 2004/09/02 14:57:08 drh Exp $
           17  +** $Id: main.c,v 1.258 2004/09/02 15:53:57 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <ctype.h>
    22     22   
    23     23   /*
    24     24   ** The following constant value is used by the SQLITE_BIGENDIAN and
................................................................................
   574    574   ){
   575    575   #if SQLITE_MIN_SLEEP_MS==1
   576    576     static const char delays[] =
   577    577        { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50,  50, 100};
   578    578     static const short int totals[] =
   579    579        { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228, 287};
   580    580   # define NDELAY (sizeof(delays)/sizeof(delays[0]))
   581         -  int timeout = (int)Timeout;
   582         -  int delay, prior;
          581  +  ptr timeout = (ptr)Timeout;
          582  +  ptr delay, prior;
   583    583   
   584    584     if( count <= NDELAY ){
   585    585       delay = delays[count-1];
   586    586       prior = totals[count-1];
   587    587     }else{
   588    588       delay = delays[NDELAY-1];
   589    589       prior = totals[NDELAY-1] + delay*(count-NDELAY-1);
................................................................................
   645    645   
   646    646   /*
   647    647   ** This routine installs a default busy handler that waits for the
   648    648   ** specified number of milliseconds before returning 0.
   649    649   */
   650    650   int sqlite3_busy_timeout(sqlite3 *db, int ms){
   651    651     if( ms>0 ){
   652         -    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms);
          652  +    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)(ptr)ms);
   653    653     }else{
   654    654       sqlite3_busy_handler(db, 0, 0);
   655    655     }
   656    656     return SQLITE_OK;
   657    657   }
   658    658   
   659    659   /*