From: drh Date: Fri, 27 Jan 2017 13:14:12 +0000 (+0000) Subject: Alternative ICU fix (compare to check-in [50e60cb4]) that avoids casting X-Git-Tag: version-3.17.0~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ec82ff2ba27094ce75b0a3ea53063b72d803c13;p=thirdparty%2Fsqlite.git Alternative ICU fix (compare to check-in [50e60cb4]) that avoids casting integers to pointers. FossilOrigin-Name: d9752c8f7c55426fd7d2b877c5cc3784f93b5349 --- diff --git a/ext/icu/icu.c b/ext/icu/icu.c index 50518d08a7..7c37812d86 100644 --- a/ext/icu/icu.c +++ b/ext/icu/icu.c @@ -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 ); } diff --git a/manifest b/manifest index 24e35fa9c7..1c84aea007 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index beee9d8c88..92d5c8ac0b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -58f02e6eae8fc9e2577fe435b0282fb46af3960d \ No newline at end of file +d9752c8f7c55426fd7d2b877c5cc3784f93b5349 \ No newline at end of file