Added SQLITE_EXPERIMENTAL and SQLITE_DEPRECATED tags to APIs to take advantage of compiler warnings (with the necessary function attributes.) Ticket #3142. (CVS 5551)

FossilOrigin-Name: 5f4b547aba56564cebfdd442d2171c1c8c2979ba
This commit is contained in:
shane
2008-08-11 17:27:01 +00:00
parent 812389666c
commit a79c3cc4ec
3 changed files with 49 additions and 25 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
C Disallow\sempty\striggers.\s\sTicket\s#3283.\s\sThis\sdoes\snot\spresent\sa\sbackwards\ncompatibility\sproblem\sbecause\sprior\sto\sthis\schange,\san\sempty\strigger\swould\nsegfault.\s(CVS\s5550)
D 2008-08-11T14:26:35
C Added\sSQLITE_EXPERIMENTAL\sand\sSQLITE_DEPRECATED\stags\sto\sAPIs\sto\stake\sadvantage\sof\scompiler\swarnings\s(with\sthe\snecessary\sfunction\sattributes.)\s\sTicket\s#3142.\s(CVS\s5551)
D 2008-08-11T17:27:02
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 2713ea64947be3b35f35d9a3158bb8299c90b019
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -144,7 +144,7 @@ F src/printf.c 2e984b2507291a7e16d89dc9bb60582904f6247d
F src/random.c 5c754319d38abdd6acd74601ee0105504adc508a
F src/select.c 390d1bdde0c24f0225e369896da8e60ef2aeffbe
F src/shell.c 4b835fe734304ac22a3385868cd3790c1e4f7aa1
F src/sqlite.h.in ee034584ec883aa37d8b4e2b94b03c7990a5fcf2
F src/sqlite.h.in e0a00bff50997f9210d8eb014b3af48f4eaafb42
F src/sqlite3ext.h 1e3887c9bd3ae66cb599e922824b04cd0d0f2c3e
F src/sqliteInt.h 685b9cf6537e59e4453269b43acb33c59b566346
F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8
@@ -617,7 +617,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 02232e71441efc75e0729423f635ce21809fe412
R a0421b2c8349a6019a5300ef437072f5
U drh
Z b2ec72f356e4a51de4e29f9ee664e69c
P 571adab9d2215fac6ed375257a070b8ffa9d9808
R fcfa79ccf98383011a1b0e291c0c7cff
U shane
Z bb732ecf52d8f084294f658ab4f24744
+1 -1
View File
@@ -1 +1 @@
571adab9d2215fac6ed375257a070b8ffa9d9808
5f4b547aba56564cebfdd442d2171c1c8c2979ba
+41 -17
View File
@@ -30,7 +30,7 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.388 2008/08/06 13:40:13 danielk1977 Exp $
** @(#) $Id: sqlite.h.in,v 1.389 2008/08/11 17:27:02 shane Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
@@ -51,6 +51,30 @@ extern "C" {
# define SQLITE_EXTERN extern
#endif
/*
** Add the ability to mark interfaces as deprecated.
*/
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
/* GCC added the deprecated attribute in version 3.1 */
#define SQLITE_DEPRECATED __attribute__ ((deprecated))
#elif defined(_MSC_VER)
#define SQLITE_DEPRECATED __declspec(deprecated)
#else
#define SQLITE_DEPRECATED
#endif
/*
** Add the ability to mark interfaces as experimental.
*/
#if (__GNUC__ > 3)
/* GCC added the warning attribute in version 4.0 (I think) */
#define SQLITE_EXPERIMENTAL __attribute__ ((warning ("is experimental")))
#elif defined(_MSC_VER)
#define SQLITE_EXPERIMENTAL __declspec(deprecated("was declared experimental"))
#else
#define SQLITE_EXPERIMENTAL
#endif
/*
** Ensure these symbols were not defined by some previous header file.
*/
@@ -966,7 +990,7 @@ int sqlite3_os_end(void);
** If the option is unknown or SQLite is unable to set the option
** then this routine returns a non-zero [error code].
*/
int sqlite3_config(int, ...);
SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);
/*
** CAPI3REF: Configure database connections {H10180} <S20000>
@@ -987,7 +1011,7 @@ int sqlite3_config(int, ...);
** New verbs are likely to be added in future releases of SQLite.
** Additional arguments depend on the verb.
*/
int sqlite3_db_config(sqlite3*, int op, ...);
SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);
/*
** CAPI3REF: Memory Allocation Routines {H10155} <S20120>
@@ -2279,8 +2303,8 @@ int sqlite3_set_authorizer(
** of the number of nanoseconds of wall-clock time required to
** run the SQL statement from start to finish.
*/
void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
void *sqlite3_profile(sqlite3*,
SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
/*
@@ -3947,12 +3971,12 @@ int sqlite3_create_function16(
** the use of these functions. To help encourage people to avoid
** using these functions, we are not going to tell you want they do.
*/
int sqlite3_aggregate_count(sqlite3_context*);
int sqlite3_expired(sqlite3_stmt*);
int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
int sqlite3_global_recover(void);
void sqlite3_thread_cleanup(void);
int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
SQLITE_DEPRECATED int sqlite3_global_recover(void);
SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
/*
** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} <S20200>
@@ -5377,7 +5401,7 @@ struct sqlite3_index_info {
** This interface is experimental and is subject to change or
** removal in future releases of SQLite.
*/
int sqlite3_create_module(
SQLITE_EXPERIMENTAL int sqlite3_create_module(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *, /* Methods for the module */
@@ -5392,7 +5416,7 @@ int sqlite3_create_module(
** except that it allows a destructor function to be specified. It is
** even more experimental than the rest of the virtual tables API.
*/
int sqlite3_create_module_v2(
SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *, /* Methods for the module */
@@ -5464,7 +5488,7 @@ struct sqlite3_vtab_cursor {
** This interface is experimental and is subject to change or
** removal in future releases of SQLite.
*/
int sqlite3_declare_vtab(sqlite3*, const char *zCreateTable);
SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zCreateTable);
/*
** CAPI3REF: Overload A Function For A Virtual Table {H18300} <S20400>
@@ -5485,7 +5509,7 @@ int sqlite3_declare_vtab(sqlite3*, const char *zCreateTable);
** This API should be considered part of the virtual table interface,
** which is experimental and subject to change.
*/
int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
/*
** The interface to the virtual-table mechanism defined above (back up
@@ -6142,7 +6166,7 @@ int sqlite3_test_control(int op, ...);
**
** See also: [sqlite3_db_status()]
*/
int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
/*
** CAPI3REF: Database Connection Status {H17201} <S60200>
@@ -6162,7 +6186,7 @@ int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
**
** See also: [sqlite3_status()].
*/
int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
/*
** CAPI3REF: Status Parameters {H17250} <H17200>