/ Check-in [6f328c35]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add the "LL" suffix on a pair of larger integer literals, for compatibility with older C compilers.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6f328c35947d6b3a0741514757b8944692203e89bdb2e7f9bbce8ad9288be344
User & Date: drh 2019-07-09 23:35:50
Context
2019-07-10
17:32
Version 3.29.0 check-in: fc82b73e user: drh tags: trunk, release, version-3.29.0
2019-07-09
23:35
Add the "LL" suffix on a pair of larger integer literals, for compatibility with older C compilers. check-in: 6f328c35 user: drh tags: trunk
17:36
Update rtree.c so that SQLITE_DEBUG is required to turn on assert() statements, even if it is compiled separately from the amalgamation. check-in: b6e17f01 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbemem.c.

699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
** comparison of "r1==(double)i" you sometimes get an answer of false even
** though the r1 and (double)i values are bit-for-bit the same.
*/
int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
  double r2 = (double)i;
  return r1==0.0
      || (memcmp(&r1, &r2, sizeof(r1))==0
          && i >= -2251799813685248 && i < 2251799813685248);
}

/*
** Convert pMem so that it has type MEM_Real or MEM_Int.
** Invalidate any prior representations.
**
** Every effort is made to force the conversion, even if the input







|







699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
** comparison of "r1==(double)i" you sometimes get an answer of false even
** though the r1 and (double)i values are bit-for-bit the same.
*/
int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
  double r2 = (double)i;
  return r1==0.0
      || (memcmp(&r1, &r2, sizeof(r1))==0
          && i >= -2251799813685248LL && i < 2251799813685248LL);
}

/*
** Convert pMem so that it has type MEM_Real or MEM_Int.
** Invalidate any prior representations.
**
** Every effort is made to force the conversion, even if the input