/ Check-in [d8e8c7e5]
Login

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

Overview
Comment:The strlen30 function in tclsqlite.c should be defined regardless of whether or not the amalgamation is used. (CVS 6012)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d8e8c7e51c09dc4e4d7e45ba1866c78713d6f5aa
User & Date: drh 2008-12-10 22:18:40
Context
2008-12-10
22:30
Work to remove harmless MSVC compiler warnings. (CVS 6013) check-in: 715dcd52 user: shane tags: trunk
22:18
The strlen30 function in tclsqlite.c should be defined regardless of whether or not the amalgamation is used. (CVS 6012) check-in: d8e8c7e5 user: drh tags: trunk
22:15
Fix an issue with the new sqlite3Strlen30() introduced by check-in (6007). Additional casts for compiler warnings. (CVS 6011) check-in: 258722b6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/tclsqlite.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** A TCL Interface to SQLite.  Append this file to sqlite3.c and
    13     13   ** compile the whole thing to build a TCL-enabled version of SQLite.
    14     14   **
    15         -** $Id: tclsqlite.c,v 1.230 2008/12/10 22:15:00 drh Exp $
           15  +** $Id: tclsqlite.c,v 1.231 2008/12/10 22:18:40 drh Exp $
    16     16   */
    17     17   #include "tcl.h"
    18     18   #include <errno.h>
    19     19   
    20     20   /*
    21     21   ** Some additional include files are needed if this file is not
    22     22   ** appended to the amalgamation.
................................................................................
   125    125     SqliteDb *pDb;            /* Associated database connection */
   126    126     int iSeek;                /* Current seek offset */
   127    127     Tcl_Channel channel;      /* Channel identifier */
   128    128     IncrblobChannel *pNext;   /* Linked list of all open incrblob channels */
   129    129     IncrblobChannel *pPrev;   /* Linked list of all open incrblob channels */
   130    130   };
   131    131   
   132         -#ifndef SQLITE_AMALGAMATION
   133    132   /*
   134    133   ** Compute a string length that is limited to what can be stored in
   135    134   ** lower 30 bits of a 32-bit signed integer.
   136    135   */
   137    136   static int strlen30(const char *z){
   138    137     const char *z2 = z;
   139    138     while( *z2 ){ z2++; }
   140    139     return 0x3fffffff & (int)(z2 - z);
   141    140   }
   142         -#endif
   143    141   
   144    142   
   145    143   #ifndef SQLITE_OMIT_INCRBLOB
   146    144   /*
   147    145   ** Close all incrblob channels opened using database connection pDb.
   148    146   ** This is called when shutting down the database connection.
   149    147   */