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

Side by Side Diff: third_party/sqlite/fts2.patch

Issue 6835006: Convert to SQLite amalgamation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 diff -ru ext-orig/fts2/fts2.c ext/fts2/fts2.c 1 diff -ru ext-orig/fts2/fts2.c ext/fts2/fts2.c
2 --- ext-orig/fts2/fts2.c 2009-09-04 13:37:41.000000000 -0700 2 --- ext-orig/fts2/fts2.c 2009-09-04 13:37:41.000000000 -0700
3 +++ ext/fts2/fts2.c 2009-09-30 14:48:14.000000000 -0700 3 +++ ext/fts2/fts2.c 2009-09-30 14:48:14.000000000 -0700
4 @@ -37,6 +37,20 @@ 4 @@ -37,6 +37,20 @@
5 ** This is an SQLite module implementing full-text search. 5 ** This is an SQLite module implementing full-text search.
6 */ 6 */
7 7
8 +/* TODO(shess): To make it easier to spot changes without groveling 8 +/* TODO(shess): To make it easier to spot changes without groveling
9 +** through changelogs, I've defined GEARS_FTS2_CHANGES to call them 9 +** through changelogs, I've defined GEARS_FTS2_CHANGES to call them
10 +** out, and I will document them here. On imports, these changes 10 +** out, and I will document them here. On imports, these changes
11 +** should be reviewed to make sure they are still present, or are 11 +** should be reviewed to make sure they are still present, or are
12 +** dropped as appropriate. 12 +** dropped as appropriate.
13 +** 13 +**
14 +** SQLite core adds the custom function fts2_tokenizer() to be used 14 +** SQLite core adds the custom function fts2_tokenizer() to be used
15 +** for defining new tokenizers. The second parameter is a vtable 15 +** for defining new tokenizers. The second parameter is a vtable
16 +** pointer encoded as a blob. Obviously this cannot be exposed to 16 +** pointer encoded as a blob. Obviously this cannot be exposed to
17 +** Gears callers for security reasons. It could be suppressed in the 17 +** Gears callers for security reasons. It could be suppressed in the
18 +** authorizer, but for now I have simply commented the definition out. 18 +** authorizer, but for now I have simply commented the definition out.
19 +*/ 19 +*/
20 +#define GEARS_FTS2_CHANGES 1 20 +#define GEARS_FTS2_CHANGES 1
21 + 21 +
22 /* 22 /*
23 ** The code in this file is only compiled if: 23 ** The code in this file is only compiled if:
24 ** 24 **
25 @@ -326,8 +326,10 @@
26 #include "fts2_hash.h"
27 #include "fts2_tokenizer.h"
28 #include "sqlite3.h"
29 -#include "sqlite3ext.h"
30 -SQLITE_EXTENSION_INIT1
31 +#ifndef SQLITE_CORE
32 +# include "sqlite3ext.h"
33 + SQLITE_EXTENSION_INIT1
34 +#endif
35
36
37 /* TODO(shess) MAN, this thing needs some refactoring. At minimum, it
25 @@ -335,6 +349,16 @@ 38 @@ -335,6 +349,16 @@
26 # define TRACE(A) 39 # define TRACE(A)
27 #endif 40 #endif
28 41
29 +#if 0 42 +#if 0
30 +/* Useful to set breakpoints. See main.c sqlite3Corrupt(). */ 43 +/* Useful to set breakpoints. See main.c sqlite3Corrupt(). */
31 +static int fts2Corrupt(void){ 44 +static int fts2Corrupt(void){
32 + return SQLITE_CORRUPT; 45 + return SQLITE_CORRUPT;
33 +} 46 +}
34 +# define SQLITE_CORRUPT_BKPT fts2Corrupt() 47 +# define SQLITE_CORRUPT_BKPT fts2Corrupt()
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 while( iStart<iEnd ){ 1925 while( iStart<iEnd ){
1913 int iWhite = iStart; 1926 int iWhite = iStart;
1914 - U8_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c); 1927 - U8_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
1915 + U16_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c); 1928 + U16_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
1916 if( u_isspace(c) ){ 1929 if( u_isspace(c) ){
1917 iStart = iWhite; 1930 iStart = iWhite;
1918 }else{ 1931 }else{
1919 diff -ru ext-orig/fts2/fts2_tokenizer.c ext/fts2/fts2_tokenizer.c 1932 diff -ru ext-orig/fts2/fts2_tokenizer.c ext/fts2/fts2_tokenizer.c
1920 --- ext-orig/fts2/fts2_tokenizer.c 2009-09-03 13:32:06.000000000 -0700 1933 --- ext-orig/fts2/fts2_tokenizer.c 2009-09-03 13:32:06.000000000 -0700
1921 +++ ext/fts2/fts2_tokenizer.c 2009-09-18 14:39:41.000000000 -0700 1934 +++ ext/fts2/fts2_tokenizer.c 2009-09-18 14:39:41.000000000 -0700
1922 @@ -33,6 +33,7 @@ 1935 @@ -28,11 +28,14 @@
1936
1937 #include "sqlite3.h"
1938 #include "sqlite3ext.h"
1939 -SQLITE_EXTENSION_INIT1
1940 +#ifndef SQLITE_CORE
1941 + SQLITE_EXTENSION_INIT1
1942 +#endif
1943
1923 #include "fts2_hash.h" 1944 #include "fts2_hash.h"
1924 #include "fts2_tokenizer.h" 1945 #include "fts2_tokenizer.h"
1925 #include <assert.h> 1946 #include <assert.h>
1926 +#include <stddef.h> 1947 +#include <stddef.h>
1927 1948
1928 /* 1949 /*
1929 ** Implementation of the SQL scalar function for accessing the underlying 1950 ** Implementation of the SQL scalar function for accessing the underlying
OLDNEW
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.h ('k') | third_party/sqlite/google_generate_amalgamation.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698