SQLite

Check-in [9db346dede]
Login

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

Overview
Comment:Avoid the use of UTF16 functions in code that is part of a build when UTF16 support is omitted. Ticket #2949. (CVS 4799)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9db346dede59e7185afcd7f21b2f578c9a4f949e
User & Date: drh 2008-02-19 15:44:10.000
Context
2008-02-19
18:28
Remove an instance of sprintf() from the VM implementation. SQLite should not use sprintf() from the C library - it has its own implementation. (CVS 4800) (check-in: 68f5ddddf0 user: drh tags: trunk)
15:44
Avoid the use of UTF16 functions in code that is part of a build when UTF16 support is omitted. Ticket #2949. (CVS 4799) (check-in: 9db346dede user: drh tags: trunk)
15:20
Make sure SQLITE_OPEN_DELETEONCLOSE is ignored by sqlite3_open_v2(). (CVS 4798) (check-in: 33e26f6adf user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbemem.c.
623
624
625
626
627
628
629
630




631
632
633
634
635
636
637
    sqlite3VdbeMemSetNull(pMem);
    return SQLITE_OK;
  }

  flags = (enc==0?MEM_Blob:MEM_Str);
  if( nByte<0 ){
    assert( enc!=0 );
    nByte = ((enc==SQLITE_UTF8)?strlen(z):sqlite3Utf16ByteLen(z, -1));




    flags |= MEM_Term;
  }

  /* The following block sets the new values of Mem.z and Mem.xDel. It
  ** also sets a flag in local variable "flags" to indicate the memory
  ** management (one of MEM_Dyn or MEM_Static).
  */







|
>
>
>
>







623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
    sqlite3VdbeMemSetNull(pMem);
    return SQLITE_OK;
  }

  flags = (enc==0?MEM_Blob:MEM_Str);
  if( nByte<0 ){
    assert( enc!=0 );
    if( enc==SQLITE_UTF8 ){
      for(nByte=0; z[nByte]; nByte++){}
    }else{
      for(nByte=0; z[nByte] | z[nByte+1]; nByte+=2){}
    }
    flags |= MEM_Term;
  }

  /* The following block sets the new values of Mem.z and Mem.xDel. It
  ** also sets a flag in local variable "flags" to indicate the memory
  ** management (one of MEM_Dyn or MEM_Static).
  */