SQLITE_EXTENSION_INIT1
#include <assert.h>
#include <string.h>
-#include <ctype.h> /* amalgamator: keep */
#include <stdlib.h>
#include <stdarg.h>
** Versions of isspace(), isalnum() and isdigit() to which it is safe
** to pass signed char values.
*/
-#define safe_isdigit(x) isdigit((unsigned char)(x))
-#define safe_isalnum(x) isalnum((unsigned char)(x))
+#ifdef sqlite3Isdigit
+ /* Use the SQLite core versions if this routine is part of the
+ ** SQLite amalgamation */
+# define safe_isdigit(x) sqlite3Isdigit(x)
+# define safe_isalnum(x) sqlite3Isalnum(x)
+#else
+ /* Use the standard library for separate compilation */
+#include <ctype.h> /* amalgamator: keep */
+# define safe_isdigit(x) isdigit((unsigned char)(x))
+# define safe_isalnum(x) isalnum((unsigned char)(x))
+#endif
/*
** Growing our own isspace() routine this way is twice as fast as
int_as_real: /* fall through to real */;
}
case JSON_REAL: {
- double r = strtod(pNode->u.zJContent, 0);
+ double r;
+#ifdef SQLITE_AMALGAMATION
+ const char *z = pNode->u.zJContent;
+ sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
+#else
+ r = strtod(pNode->u.zJContent, 0);
+#endif
sqlite3_result_double(pCtx, r);
break;
}
-C Form-feed\sis\snot\svalid\swhitespace\sfor\sjson.\s\s\nFix\sfor\sticket\s[57eec374ae1d0a1d]
-D 2015-10-16T15:16:06.127
+C Fix\sthe\sJSON1\sextension\sso\sthat\sit\sdoes\snot\sdepend\son\sisdigit()\sand\nstrtod()\sfrom\sthe\sstandard\slibrary\swhen\scompiled\sinto\sSQLite\sas\spart\sof\sthe\namalgamation.
+D 2015-10-16T15:35:39.846
F Makefile.in 2ea961bc09e441874eb3d1bf7398e04feb24f3ee
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 8e42cb55739cd8c12e1fd25401956e2019448f6a
F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f
F ext/misc/fuzzer.c 4c84635c71c26cfa7c2e5848cf49fe2d2cfcd767
F ext/misc/ieee754.c b0362167289170627659e84173f5d2e8fee8566e
-F ext/misc/json1.c d559a00d83766cffc6506ee34ceda24895f13605
+F ext/misc/json1.c 4f45afd9dbcd6feca8c528251efbb7fc09299a09
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63
F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 2ad72be12477b0e8e33e56a9a17e29abbd283ec1
-R 62f0d8008c01d0defc2c9b4656e1c898
+P 28957d635961c525f735a52b8ffe3e69ccf31382
+R c52fcc2e6376b553d4a08dc304f342ca
U drh
-Z d6a4952373fb13844f78e8a8e4575f90
+Z 74777d79c7bc4ee5f8a88ff1109e65fc
-28957d635961c525f735a52b8ffe3e69ccf31382
\ No newline at end of file
+bc9a9a60c31ebf9b11ac89ae5f99a3b66d6efc67
\ No newline at end of file