SQLite
Check-in [6d797352]
Not logged in
Overview
SHA1 Hash:6d7973524a7d3bf3158fdac58975945da7f51740
Date: 2013-02-26 05:42:30
User: mistachkin
Comment:Remove extra use of the sqlite3_value_int64() function.
Tags And Properties
Context
2013-02-26
06:14
[fa1842e4] Change the way test script incrvacuum3.test copies database files in order to avoid trying to read the (locked) 512 byte 'pending-byte' region. (user: dan, tags: trunk)
05:44
[d2e7dfca] Closed-Leaf: Prevent Tcl file encoding issues in the tests for the unicode() and char() functions. (user: mistachkin, tags: funcTestEncoding)
05:42
[6d797352] Remove extra use of the sqlite3_value_int64() function. (user: mistachkin, tags: trunk)
2013-02-25
14:39
[be249390] Add new SQL functions unicode() and char(). (user: drh, tags: trunk)
Changes
Hide Diffs Unified Diffs 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);