1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Make the SQLITE_EXTENSION_INIT1 and SQLITE_EXTENSION_INIT2 macros into

no-ops if the extension is statically linked.

FossilOrigin-Name: 86eb3eed4c70730dba0e319f243f8cb4fa8de06c
This commit is contained in:
drh
2013-04-19 01:23:06 +00:00
parent c288e442e3
commit 08ef8d7311
4 changed files with 20 additions and 14 deletions

View File

@@ -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_ */