SQLite

Check-in [d8e8c7e51c]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d8e8c7e51c09dc4e4d7e45ba1866c78713d6f5aa
User & Date: drh 2008-12-10 22:18:40.000
Context
2008-12-10
22:30
Work to remove harmless MSVC compiler warnings. (CVS 6013) (check-in: 715dcd52c1 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: d8e8c7e51c 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: 258722b617 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/tclsqlite.c.
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22







-
+







**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** A TCL Interface to SQLite.  Append this file to sqlite3.c and
** compile the whole thing to build a TCL-enabled version of SQLite.
**
** $Id: tclsqlite.c,v 1.230 2008/12/10 22:15:00 drh Exp $
** $Id: tclsqlite.c,v 1.231 2008/12/10 22:18:40 drh Exp $
*/
#include "tcl.h"
#include <errno.h>

/*
** Some additional include files are needed if this file is not
** appended to the amalgamation.
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139
140

141
142
143
144
145
146
147







-









-







  SqliteDb *pDb;            /* Associated database connection */
  int iSeek;                /* Current seek offset */
  Tcl_Channel channel;      /* Channel identifier */
  IncrblobChannel *pNext;   /* Linked list of all open incrblob channels */
  IncrblobChannel *pPrev;   /* Linked list of all open incrblob channels */
};

#ifndef SQLITE_AMALGAMATION
/*
** Compute a string length that is limited to what can be stored in
** lower 30 bits of a 32-bit signed integer.
*/
static int strlen30(const char *z){
  const char *z2 = z;
  while( *z2 ){ z2++; }
  return 0x3fffffff & (int)(z2 - z);
}
#endif


#ifndef SQLITE_OMIT_INCRBLOB
/*
** Close all incrblob channels opened using database connection pDb.
** This is called when shutting down the database connection.
*/