diff options
author | drh <> | 2023-12-05 18:28:15 +0000 |
---|---|---|
committer | drh <> | 2023-12-05 18:28:15 +0000 |
commit | a0de45459e8dcd8594a95684768f14c680570e04 (patch) | |
tree | 40c42e22ac4fb2df2127fa84002c85349f4ad59f /src/json.c | |
parent | 8eac91fab71bec3638d468330446635ca5640486 (diff) | |
download | sqlite-a0de45459e8dcd8594a95684768f14c680570e04.tar.gz sqlite-a0de45459e8dcd8594a95684768f14c680570e04.zip |
Miscellaneous comment cleanup and typo fixes.
FossilOrigin-Name: 59446dc0bd0091572122a3c8b4653d7a2dc867d16c4a5919f79b81bc3a673ce3
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/json.c b/src/json.c index 2fc6c8b74..15f99d49b 100644 --- a/src/json.c +++ b/src/json.c @@ -10,7 +10,7 @@ ** ****************************************************************************** ** -** This SQLite JSON functions. +** SQLite JSON functions. ** ** This file began as an extension in ext/misc/json1.c in 2015. That ** extension proved so useful that it has now been moved into the core. @@ -170,7 +170,7 @@ static const char jsonIsSpace[] = { /* ** The set of all space characters recognized by jsonIsspace(). -** Useful as an argument to strspn(). +** Useful as the second argument to strspn(). */ static const char jsonSpaces[] = "\011\012\015\040"; @@ -198,14 +198,6 @@ static const char jsonIsOk[256] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; -/* Put code used only for testing inside the JSON_VVA() macro. -*/ -#if !defined(SQLITE_DEBUG) && !defined(SQLITE_COVERAGE_TEST) -# define JSON_VVA(X) -#else -# define JSON_VVA(X) X -#endif - /* Objects */ typedef struct JsonCache JsonCache; typedef struct JsonString JsonString; @@ -263,8 +255,8 @@ struct JsonString { #define JSON_SUBTYPE 74 /* Ascii for "J" */ /* -** Bit values for the flags passed into jsonExtractFunc() or -** jsonSetFunc() via the user-data value. +** Bit values for the flags passed into various SQL function implementations +** via the sqlite3_user_data() value. */ #define JSON_JSON 0x01 /* Result is always JSON */ #define JSON_SQL 0x02 /* Result is always SQL */ @@ -323,7 +315,11 @@ struct JsonParse { ** descent parser. A depth of 1000 is far deeper than any sane JSON ** should go. Historical note: This limit was 2000 prior to version 3.42.0 */ -#define JSON_MAX_DEPTH 1000 +#ifndef SQLITE_JSON_MAX_DEPTH +# define JSON_MAX_DEPTH 1000 +#else +# define JSON_MAX_DEPTH SQLITE_JSON_MAX_DEPTH +#endif /* ** Allowed values for the flgs argument to jsonParseFuncArg(); @@ -807,6 +803,10 @@ static void jsonParseFree(JsonParse *pParse){ } } +/************************************************************************** +** Utility routines for the JSON text parser +**************************************************************************/ + /* ** Translate a single byte of Hex into an integer. ** This routine only gives a correct answer if h really is a valid hexadecimal |