From a0de45459e8dcd8594a95684768f14c680570e04 Mon Sep 17 00:00:00 2001 From: drh <> Date: Tue, 5 Dec 2023 18:28:15 +0000 Subject: [PATCH] Miscellaneous comment cleanup and typo fixes. FossilOrigin-Name: 59446dc0bd0091572122a3c8b4653d7a2dc867d16c4a5919f79b81bc3a673ce3 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/json.c | 26 +++++++++++++------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/manifest b/manifest index e5224d07aa..ff6dfffb99 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Use\sstrspn()\sto\saccelerate\swhitespace\sbypass\sin\sthe\sJSON\sparser. -D 2023-12-05T12:52:13.143 +C Miscellaneous\scomment\scleanup\sand\stypo\sfixes. +D 2023-12-05T18:28:15.619 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -688,7 +688,7 @@ F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51 F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276 -F src/json.c 752aabf2c961d5d79143ae4a2b41d1bf60d4ec15110b0b75c5c3de5fe62d4dd1 +F src/json.c 00480474f134f18d77275de3fe1220b198059af39d41b8549f14af991ee50c64 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36 F src/main.c 1b89f3de98d1b59fec5bac1d66d6ece21f703821b8eaa0d53d9604c35309f6f9 @@ -2145,8 +2145,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 4c587feac153e8ebe526559ec3d254f545f81e8d1ed3126f91a5ff25ec4aa72e -R 7ec679fd53493789f3af3780d93617a7 +P 843197df08352bdff4b87be91d160e574572aded0d0c66142fd960000c0b4701 +R 51649fd2031c328be393a9b165de9b28 U drh -Z be9b20ef175c9b8d4ac4f39def382e58 +Z 92ba2a23f6f1deba28c66b8e97e6bff1 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 3eb7382c63..bdb4e91e40 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -843197df08352bdff4b87be91d160e574572aded0d0c66142fd960000c0b4701 \ No newline at end of file +59446dc0bd0091572122a3c8b4653d7a2dc867d16c4a5919f79b81bc3a673ce3 \ No newline at end of file diff --git a/src/json.c b/src/json.c index 2fc6c8b74f..15f99d49b2 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 -- 2.47.2