diff options
author | shaneh <shaneh@noemail.net> | 2010-02-23 04:19:54 +0000 |
---|---|---|
committer | shaneh <shaneh@noemail.net> | 2010-02-23 04:19:54 +0000 |
commit | bdea6d13685fd9b33e27c7b89558496a2dbd7a9b (patch) | |
tree | bfef16b92a8f46c06be0df4be8b3cad317a277b3 /src/func.c | |
parent | 127f9d75e289e3a4cd45a16889bced0d94a1a608 (diff) | |
download | sqlite-bdea6d13685fd9b33e27c7b89558496a2dbd7a9b.tar.gz sqlite-bdea6d13685fd9b33e27c7b89558496a2dbd7a9b.zip |
Test new api to report which options (defines) were used to compile SQLite.
FossilOrigin-Name: 84c9756993caf82710a0905ed1987d144bc764fd
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/func.c b/src/func.c index d633ff83c..19903e71d 100644 --- a/src/func.c +++ b/src/func.c @@ -774,6 +774,21 @@ static void sourceidFunc( sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC); } +/* +** Implementation of the sqlite_compile_opts() function. The result is a string +** that identifies the compiler options used to build SQLite. +*/ +static void compileoptsFunc( + sqlite3_context *context, + int NotUsed, + sqlite3_value **NotUsed2 +){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); + /* IMP: R-xxxx This function is an SQL wrapper around the + ** sqlite3_compileopts() C interface. */ + sqlite3_result_text(context, sqlite3_compileopts(), -1, SQLITE_STATIC); +} + /* Array for converting from half-bytes (nybbles) into ASCII hex ** digits. */ static const char hexdigits[] = { @@ -1505,6 +1520,7 @@ void sqlite3RegisterGlobalFunctions(void){ FUNCTION(nullif, 2, 0, 1, nullifFunc ), FUNCTION(sqlite_version, 0, 0, 0, versionFunc ), FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ), + FUNCTION(sqlite_compile_opts,0, 0, 0, compileoptsFunc ), FUNCTION(quote, 1, 0, 0, quoteFunc ), FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid), FUNCTION(changes, 0, 0, 0, changes ), |