SQLite

Check-in [062cca9c63]
Login

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

Overview
Comment:Remove an incorrect ALWAYS() macro. Forum post 2025-04-08T19:16:42Z.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 062cca9c63ef6d7b9a525df69391e9b032284703aeb45a18c728305dd5957c43
User & Date: drh 2025-04-08 20:00:33.824
Context
2025-04-09
13:32
Doc updates in proj.tcl. Improve configure check for whether fdatasync or nanosleep require -lrt. Remove references to 'tcl-config' build mode from sqlite-config.tcl, as that build is now implemented without a depency on sqlite-config.tcl because the TEA build's needs are considerably more modest. (check-in: 394bef5441 user: stephan tags: trunk)
2025-04-08
20:00
Remove an incorrect ALWAYS() macro. Forum post 2025-04-08T19:16:42Z. (check-in: 062cca9c63 user: drh tags: trunk)
17:18
Have sqlite3session_diff() automatically attach tables to session objects, as it has always been documented to do. (check-in: 99827144f1 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/utf.c.
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
int sqlite3Utf16ByteLen(const void *zIn, int nByte, int nChar){
  int c;
  unsigned char const *z = zIn;
  unsigned char const *zEnd = &z[nByte-1];
  int n = 0;
  
  if( SQLITE_UTF16NATIVE==SQLITE_UTF16LE ) z++;
  while( n<nChar && ALWAYS(z<=zEnd) ){
    c = z[0];
    z += 2;
    if( c>=0xd8 && c<0xdc && z<=zEnd && z[0]>=0xdc && z[0]<0xe0 ) z += 2;
    n++;
  }
  return (int)(z-(unsigned char const *)zIn) 
              - (SQLITE_UTF16NATIVE==SQLITE_UTF16LE);







|







551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
int sqlite3Utf16ByteLen(const void *zIn, int nByte, int nChar){
  int c;
  unsigned char const *z = zIn;
  unsigned char const *zEnd = &z[nByte-1];
  int n = 0;
  
  if( SQLITE_UTF16NATIVE==SQLITE_UTF16LE ) z++;
  while( n<nChar && z<=zEnd ){
    c = z[0];
    z += 2;
    if( c>=0xd8 && c<0xdc && z<=zEnd && z[0]>=0xdc && z[0]<0xe0 ) z += 2;
    n++;
  }
  return (int)(z-(unsigned char const *)zIn) 
              - (SQLITE_UTF16NATIVE==SQLITE_UTF16LE);