Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c

Issue 826543003: [sql] Import reference version of SQLite 3.7.6.3. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: gitignore forgot some files for me. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
diff --git a/third_party/sqlite/src/ext/fts2/fts2_icu.c b/third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
similarity index 96%
copy from third_party/sqlite/src/ext/fts2/fts2_icu.c
copy to third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
index a8b835962f91d3610ed82d37062c427693e03b84..de8e116bb906c59ef5352f6b39973399427621d1 100644
--- a/third_party/sqlite/src/ext/fts2/fts2_icu.c
+++ b/third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
@@ -118,15 +118,15 @@ static int icuOpen(
nChar = nInput+1;
pCsr = (IcuCursor *)sqlite3_malloc(
sizeof(IcuCursor) + /* IcuCursor */
- (nChar+1) * sizeof(int) + /* IcuCursor.aOffset[] */
- nChar * sizeof(UChar) /* IcuCursor.aChar[] */
+ nChar * sizeof(UChar) + /* IcuCursor.aChar[] */
+ (nChar+1) * sizeof(int) /* IcuCursor.aOffset[] */
);
if( !pCsr ){
return SQLITE_NOMEM;
}
memset(pCsr, 0, sizeof(IcuCursor));
- pCsr->aOffset = (int *)&pCsr[1];
- pCsr->aChar = (UChar *)&pCsr->aOffset[nChar+1];
+ pCsr->aChar = (UChar *)&pCsr[1];
+ pCsr->aOffset = (int *)&pCsr->aChar[nChar];
pCsr->aOffset[iOut] = iInput;
U8_NEXT(zInput, iInput, nInput, c);
@@ -198,7 +198,7 @@ static int icuNext(
while( iStart<iEnd ){
int iWhite = iStart;
- U16_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
+ U8_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
if( u_isspace(c) ){
iStart = iWhite;
}else{

Powered by Google App Engine
This is Rietveld 408576698