diff options
author | drh <drh@noemail.net> | 2013-04-22 23:59:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-04-22 23:59:06 +0000 |
commit | 16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0 (patch) | |
tree | 95791389bfc2d16f158af35b89e36fd39b23cc53 /src/sqlite3ext.h | |
parent | 8bc8bfcb05ab15cac3c84b137b572350beb4de65 (diff) | |
parent | da8caa0b2da85ebaf75fce1b19f5d645246f3eba (diff) | |
download | sqlite-16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0.tar.gz sqlite-16fb176814bd2b8fe46f7ed0e50a0b3d33db89a0.zip |
Merge the latest trunk changes into the sessions branch.
FossilOrigin-Name: 6994826c0784280f2e9728dfa4185848846d03df
Diffstat (limited to 'src/sqlite3ext.h')
-rw-r--r-- | src/sqlite3ext.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index a465b8ecc..928bb3bad 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -469,7 +469,16 @@ struct sqlite3_api_routines { #define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2 #endif /* SQLITE_CORE */ -#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0; -#define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v; +#ifndef SQLITE_CORE + /* This case when the file really is being compiled as a loadable + ** extension */ +# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0; +# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v; +#else + /* This case when the file is being statically linked into the + ** application */ +# define SQLITE_EXTENSION_INIT1 /*no-op*/ +# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */ +#endif #endif /* _SQLITE3EXT_H_ */ |