]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Alternative ICU fix (compare to check-in [50e60cb4]) that avoids casting
authordrh <drh@noemail.net>
Fri, 27 Jan 2017 13:14:12 +0000 (13:14 +0000)
committerdrh <drh@noemail.net>
Fri, 27 Jan 2017 13:14:12 +0000 (13:14 +0000)
integers to pointers.

FossilOrigin-Name: d9752c8f7c55426fd7d2b877c5cc3784f93b5349

ext/icu/icu.c
manifest
manifest.uuid

index 50518d08a7141e72a01f5acd1adbad860dd0032b..7c37812d86aed44e6b975546b2b7f1a8e2a27e59 100644 (file)
@@ -500,7 +500,7 @@ int sqlite3IcuInit(sqlite3 *db){
     unsigned char iContext;                   /* sqlite3_user_data() context */
     void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
   } scalars[] = {
-    {"icu_load_collation",  2, SQLITE_UTF8,              255, icuLoadCollation},
+    {"icu_load_collation",  2, SQLITE_UTF8,                1, icuLoadCollation},
     {"regexp", 2, SQLITE_ANY|SQLITE_DETERMINISTIC,         0, icuRegexpFunc},
     {"lower",  1, SQLITE_UTF16|SQLITE_DETERMINISTIC,       0, icuCaseFunc16},
     {"lower",  2, SQLITE_UTF16|SQLITE_DETERMINISTIC,       0, icuCaseFunc16},
@@ -521,7 +521,7 @@ int sqlite3IcuInit(sqlite3 *db){
     const struct IcuScalar *p = &scalars[i];
     rc = sqlite3_create_function(
         db, p->zName, p->nArg, p->enc, 
-        p->iContext==255 ? (void*)db : (void*)(((char*)0)+p->iContext),
+        p->iContext ? (void*)db : (void*)0,
         p->xFunc, 0, 0
     );
   }
index 24e35fa9c713f54e5b3adfbfb56d809829c5b1c1..1c84aea007b33376a4116247231e69ab6f185b5e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sthe\scommand-line\sshell,\senhance\sthe\s".mode"\scommand\sso\sthat\sit\srestores\sthe\ndefault\scolumn\sand\srow\sseparators\sfor\smodes\s"line",\s"list",\s"column",\sand\n"tcl".
-D 2017-01-27T01:52:42.481
+C Alternative\sICU\sfix\s(compare\sto\scheck-in\s[50e60cb4])\sthat\savoids\scasting\nintegers\sto\spointers.
+D 2017-01-27T13:14:12.467
 F Makefile.in 5f415e7867296d678fed2e6779aea10c1318b4bc
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da
@@ -202,7 +202,7 @@ F ext/fts5/tool/loadfts5.tcl 95b03429ee6b138645703c6ca192c3ac96eaf093
 F ext/fts5/tool/mkfts5c.tcl d1c2a9ab8e0ec690a52316f33dd9b1d379942f45
 F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
 F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43
-F ext/icu/icu.c bae1dde13091b425bbed119a09a11aee14644764
+F ext/icu/icu.c 84900472a088a3a172c6c079f58a1d3a1952c332
 F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
 F ext/misc/amatch.c 211108e201105e4bb0c076527b8cfd34330fc234
 F ext/misc/carray.c 40c27641010a4dc67e3690bdb7c9d36ca58b3c2d
@@ -1547,7 +1547,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P c012619b65d70b4ef6cf33532ef57d7f8ba42d74
-R dc9b2fbf482ea9dbd0fd27947b6ee819
+P 58f02e6eae8fc9e2577fe435b0282fb46af3960d
+R 4a4a07080dc840a599a4cd01566373f4
 U drh
-Z 49761a5cfc1a2c7c58e7f0cde30087c6
+Z 816a99767333ba2de388be8cc7b0ed87
index beee9d8c886d0d3cdfd760382104e81c035e059e..92d5c8ac0b4d24c6d32b2fdc0d38917478f760f2 100644 (file)
@@ -1 +1 @@
-58f02e6eae8fc9e2577fe435b0282fb46af3960d
\ No newline at end of file
+d9752c8f7c55426fd7d2b877c5cc3784f93b5349
\ No newline at end of file