SQLite

Check-in [c42c734f11]
Login

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

Overview
Comment:Tag an unreachable branch using ALWAYS().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c42c734f11c58724f5d8b32cb1c92e274be350028868d6ed045b2cfd274c64e7
User & Date: drh 2018-01-10 13:58:23.623
Context
2018-01-10
16:30
Have the zipfile module automatically append "/" to directory names that do not already end with such a character. This is required for info-zip compatibility. (check-in: 94bc3c60e7 user: dan tags: trunk)
13:58
Tag an unreachable branch using ALWAYS(). (check-in: c42c734f11 user: drh tags: trunk)
11:56
Fix a problem in os_unix.c causing it to return SQLITE_CANTOPEN instead of SQLITE_READONLY_RECOVERY. (check-in: 6a16f554f0 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/malloc.c.
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
** SQL statement.  Make a copy of this phrase in space obtained form
** sqlite3DbMalloc().  Omit leading and trailing whitespace.
*/
char *sqlite3DbSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){
  int n;
  while( sqlite3Isspace(zStart[0]) ) zStart++;
  n = (int)(zEnd - zStart);
  while( n>0 && sqlite3Isspace(zStart[n-1]) ) n--;
  return sqlite3DbStrNDup(db, zStart, n);
}

/*
** Free any prior content in *pz and replace it with a copy of zNew.
*/
void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){







|







632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
** SQL statement.  Make a copy of this phrase in space obtained form
** sqlite3DbMalloc().  Omit leading and trailing whitespace.
*/
char *sqlite3DbSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){
  int n;
  while( sqlite3Isspace(zStart[0]) ) zStart++;
  n = (int)(zEnd - zStart);
  while( ALWAYS(n>0) && sqlite3Isspace(zStart[n-1]) ) n--;
  return sqlite3DbStrNDup(db, zStart, n);
}

/*
** Free any prior content in *pz and replace it with a copy of zNew.
*/
void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){