SQLite

Check-in [bc040073c7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Get rid of all of the compiler magic associated with SQLITE_EXPERIMENTAL and SQLITE_DEPRECATED. It was causing more problems than it was solving. Ticket #3395 et al. (CVS 5732)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bc040073c7c059e91fddece27f99fa359cc1405d
User & Date: drh 2008-09-22 17:54:46.000
Context
2008-09-23
09:36
Fix for ticket #3382 was mistakenly removed by (5712). Add an assert to prevent it from being removed again. (CVS 5733) (check-in: 01d26b3df7 user: drh tags: trunk)
2008-09-22
17:54
Get rid of all of the compiler magic associated with SQLITE_EXPERIMENTAL and SQLITE_DEPRECATED. It was causing more problems than it was solving. Ticket #3395 et al. (CVS 5732) (check-in: bc040073c7 user: drh tags: trunk)
17:22
Fix a memory leak that can follow a malloc failure in sqlite3_initialize. (CVS 5731) (check-in: 118dc0ba08 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/sqlite.h.in.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
** on how SQLite interfaces are suppose to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.398 2008/09/10 13:09:24 drh Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
#include <stdarg.h>     /* Needed for the definition of va_list */

/*
** Make sure we can call this stuff from C++.







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
** on how SQLite interfaces are suppose to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.399 2008/09/22 17:54:46 drh Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
#include <stdarg.h>     /* Needed for the definition of va_list */

/*
** Make sure we can call this stuff from C++.
48
49
50
51
52
53
54

55



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
** Add the ability to override 'extern'
*/
#ifndef SQLITE_EXTERN
# 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) && (_MSC_VER>1200) 
  #define SQLITE_DEPRECATED __declspec(deprecated)
#else
  #define SQLITE_DEPRECATED
#endif

/*
** Add the ability to mark interfaces as experimental.
*/
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
  /* I can confirm that it does not work on version 4.1.0... */
  /* First appears in GCC docs for version 4.3.0 */
  #define SQLITE_EXPERIMENTAL __attribute__ ((warning ("is experimental")))
#elif defined(_MSC_VER) && (_MSC_VER>1200) 
  #define SQLITE_EXPERIMENTAL __declspec(deprecated("was declared experimental"))
#else
  #define SQLITE_EXPERIMENTAL
#endif

/*
** Ensure these symbols were not defined by some previous header file.
*/
#ifdef SQLITE_VERSION
# undef SQLITE_VERSION
#endif







>
|
>
>
>
|
<
<
<
<
|
|
|
<
|
|
<

<
<
<
|
<
<
<
|
<







48
49
50
51
52
53
54
55
56
57
58
59
60




61
62
63

64
65

66



67



68

69
70
71
72
73
74
75
** Add the ability to override 'extern'
*/
#ifndef SQLITE_EXTERN
# define SQLITE_EXTERN extern
#endif

/*
** These no-op macros are used in front of interfaces to mark those
** interfaces as either deprecated or experimental.  New applications
** should not use deprecated intrfaces - they are support for backwards
** compatibility only.  Application writers should be aware that
** experimental interfaces are subject to change in point releases.
**




** These macros used to resolve to various kinds of compiler magic that
** would generate warning messages when they were used.  But that
** compiler magic ended up generating such a flurry of bug reports

** that we have taken it all out and gone back to using simple
** noop macros.

*/



#define SQLITE_DEPRECATED



#define SQLITE_EXPERIMENTAL


/*
** Ensure these symbols were not defined by some previous header file.
*/
#ifdef SQLITE_VERSION
# undef SQLITE_VERSION
#endif