diff options
author | drh <drh@noemail.net> | 2015-09-26 17:44:59 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-26 17:44:59 +0000 |
commit | 2f20e13b83f1c7bb80c61043f8d233c72d2878c2 (patch) | |
tree | a23e5e2ac33d8af4577bb3c830df7a5e4b34ee9b /ext/misc/json1.c | |
parent | 32498f132160f70ed0a45fed751f4fdb9d54db34 (diff) | |
download | sqlite-2f20e13b83f1c7bb80c61043f8d233c72d2878c2.tar.gz sqlite-2f20e13b83f1c7bb80c61043f8d233c72d2878c2.zip |
Enable adding JSON1 by appending the json1.c source file to the amalgamation
and compiling with -DSQLITE_ENABLE_JSON1
FossilOrigin-Name: 33404b2029120d4aabe1e25d484871810777e934
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 89b70f083..77857f544 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -1937,19 +1937,12 @@ static sqlite3_module jsonTreeModule = { #endif /* SQLITE_OMIT_VIRTUALTABLE */ /**************************************************************************** -** The following routine is the only publically visible identifier in this -** file. Call the following routine in order to register the various SQL +** The following routines are the only publically visible identifiers in this +** file. Call the following routines in order to register the various SQL ** functions and the virtual table implemented by this file. ****************************************************************************/ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_json_init( - sqlite3 *db, - char **pzErrMsg, - const sqlite3_api_routines *pApi -){ +int sqlite3Json1Init(sqlite3 *db){ int rc = SQLITE_OK; unsigned int i; static const struct { @@ -1987,8 +1980,6 @@ int sqlite3_json_init( { "json_tree", &jsonTreeModule }, }; #endif - SQLITE_EXTENSION_INIT2(pApi); - (void)pzErrMsg; /* Unused parameter */ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){ rc = sqlite3_create_function(db, aFunc[i].zName, aFunc[i].nArg, SQLITE_UTF8 | SQLITE_DETERMINISTIC, @@ -2002,3 +1993,17 @@ int sqlite3_json_init( #endif return rc; } + + +#ifdef _WIN32 +__declspec(dllexport) +#endif +int sqlite3_json_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErrMsg; /* Unused parameter */ + return sqlite3Json1Init(db); +} |