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

Unified Diff: third_party/sqlite/src/ext/fts2/fts2.c

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « third_party/sqlite/src/ext/fts1/fulltext.c ('k') | third_party/sqlite/src/ext/fts2/fts2_hash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/fts2/fts2.c
diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext/fts2/fts2.c
index 4094b29afc9c28e208e1769e8e6bd24023356a61..e585a8b5845ca31e50ed17446014a3dd246b3ad5 100644
--- a/third_party/sqlite/src/ext/fts2/fts2.c
+++ b/third_party/sqlite/src/ext/fts2/fts2.c
@@ -324,7 +324,7 @@
#include "fts2_hash.h"
#include "fts2_tokenizer.h"
#include "sqlite3.h"
-#ifndef SQLITE_CORE
+#ifndef SQLITE_CORE
# include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1
#endif
@@ -3765,7 +3765,7 @@ static int tokenizeSegment(
continue;
}
iEndLast = iEnd;
-
+
queryAdd(pQuery, pToken, nToken);
if( !inPhrase && iBegin>0 && pSegment[iBegin-1]=='-' ){
pQuery->pTerms[pQuery->nTerms-1].isNot = 1;
@@ -5288,7 +5288,7 @@ static int leavesReaderAtEnd(LeavesReader *pReader){
** modification to control flow all over the place, though, so for now
** just punt.
**
-** Note the the current system assumes that segment merges will run to
+** Note the current system assumes that segment merges will run to
** completion, which is why this particular probably hasn't arisen in
** this case. Probably a brittle assumption.
*/
@@ -5552,7 +5552,7 @@ static int leavesReadersMerge(fulltext_vtab *v,
if( rc!=SQLITE_OK ) break;
}
if( rc!=SQLITE_OK ){
- while( i-->0 ){
+ while( i-->0 ){
dlrDestroy(&dlReaders[i]);
}
return rc;
@@ -6901,7 +6901,7 @@ static void createDoclistResult(sqlite3_context *pContext,
assert( pData!=NULL && nData>0 );
rc = dlrInit(&dlReader, DL_DEFAULT, pData, nData);
- if( rc!=SQLITE_OK ) return rc;
+ if( rc!=SQLITE_OK ) return;
dataBufferInit(&dump, 0);
for( ; rc==SQLITE_OK && !dlrAtEnd(&dlReader); rc = dlrStep(&dlReader) ){
char buf[256];
@@ -6952,7 +6952,7 @@ static void createDoclistResult(sqlite3_context *pContext,
dlrDestroy(&dlReader);
if( rc!=SQLITE_OK ){
dataBufferDestroy(&dump);
- return rc;
+ return;
}
assert( dump.nData>0 );
@@ -6965,7 +6965,6 @@ static void createDoclistResult(sqlite3_context *pContext,
sqlite3_result_text(pContext, dump.pData, dump.nData, sqlite3_free);
dump.pData = NULL;
dump.nData = dump.nCapacity = 0;
- return SQLITE_OK;
}
/* Implements dump_doclist() for use in inspecting the fts2 index from
@@ -7207,7 +7206,7 @@ void sqlite3Fts2IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
int sqlite3Fts2InitHashTable(sqlite3 *, fts2Hash *, const char *);
/*
-** Initialise the fts2 extension. If this extension is built as part
+** Initialize the fts2 extension. If this extension is built as part
** of the sqlite library, then this function is called directly by
** SQLite. If fts2 is built as a dynamically loadable extension, this
** function is called by the sqlite3_extension_init() entry point.
@@ -7225,7 +7224,7 @@ int sqlite3Fts2Init(sqlite3 *db){
sqlite3Fts2IcuTokenizerModule(&pIcu);
#endif
- /* Allocate and initialise the hash-table used to store tokenizers. */
+ /* Allocate and initialize the hash-table used to store tokenizers. */
pHash = sqlite3_malloc(sizeof(fts2Hash));
if( !pHash ){
rc = SQLITE_NOMEM;
@@ -7276,7 +7275,10 @@ int sqlite3Fts2Init(sqlite3 *db){
}
#if !SQLITE_CORE
-int sqlite3_extension_init(
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int sqlite3_fts2_init(
sqlite3 *db,
char **pzErrMsg,
const sqlite3_api_routines *pApi
« no previous file with comments | « third_party/sqlite/src/ext/fts1/fulltext.c ('k') | third_party/sqlite/src/ext/fts2/fts2_hash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698