SQLite

Check-in [6d7973524a]
Login

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

Overview
Comment:Remove extra use of the sqlite3_value_int64() function.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6d7973524a7d3bf3158fdac58975945da7f51740
User & Date: mistachkin 2013-02-26 05:42:30.002
Context
2013-02-26
06:14
Change the way test script incrvacuum3.test copies database files in order to avoid trying to read the (locked) 512 byte 'pending-byte' region. (check-in: fa1842e462 user: dan tags: trunk)
05:44
Prevent Tcl file encoding issues in the tests for the unicode() and char() functions. (Closed-Leaf check-in: d2e7dfca5a user: mistachkin tags: funcTestEncoding)
05:42
Remove extra use of the sqlite3_value_int64() function. (check-in: 6d7973524a user: mistachkin tags: trunk)
2013-02-25
14:39
Add new SQL functions unicode() and char(). (check-in: be24939052 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/func.c.
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
  int i;
  zOut = z = sqlite3_malloc( argc*4 );
  if( z==0 ){
    sqlite3_result_error_nomem(context);
    return;
  }
  for(i=0; i<argc; i++){
    sqlite3_int64 x = sqlite3_value_int64(argv[i]);
    unsigned c;
    x = sqlite3_value_int64(argv[i]);
    if( x<0 || x>0x10ffff ) x = 0xfffd;
    c = (unsigned)(x & 0x1fffff);
    if( c<=0xFFFF ){
      *zOut++ = (u8)(c&0x00FF);
      *zOut++ = (u8)((c>>8)&0x00FF);







|







989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
  int i;
  zOut = z = sqlite3_malloc( argc*4 );
  if( z==0 ){
    sqlite3_result_error_nomem(context);
    return;
  }
  for(i=0; i<argc; i++){
    sqlite3_int64 x;
    unsigned c;
    x = sqlite3_value_int64(argv[i]);
    if( x<0 || x>0x10ffff ) x = 0xfffd;
    c = (unsigned)(x & 0x1fffff);
    if( c<=0xFFFF ){
      *zOut++ = (u8)(c&0x00FF);
      *zOut++ = (u8)((c>>8)&0x00FF);