/ 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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bc040073c7c059e91fddece27f99fa359cc1405d
User & Date: drh 2008-09-22 17:54:46
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
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

    26     26   ** on how SQLite interfaces are suppose to operate.
    27     27   **
    28     28   ** The name of this file under configuration management is "sqlite.h.in".
    29     29   ** The makefile makes some minor changes to this file (such as inserting
    30     30   ** the version number) and changes its name to "sqlite3.h" as
    31     31   ** part of the build process.
    32     32   **
    33         -** @(#) $Id: sqlite.h.in,v 1.398 2008/09/10 13:09:24 drh Exp $
           33  +** @(#) $Id: sqlite.h.in,v 1.399 2008/09/22 17:54:46 drh Exp $
    34     34   */
    35     35   #ifndef _SQLITE3_H_
    36     36   #define _SQLITE3_H_
    37     37   #include <stdarg.h>     /* Needed for the definition of va_list */
    38     38   
    39     39   /*
    40     40   ** Make sure we can call this stuff from C++.
................................................................................
    48     48   ** Add the ability to override 'extern'
    49     49   */
    50     50   #ifndef SQLITE_EXTERN
    51     51   # define SQLITE_EXTERN extern
    52     52   #endif
    53     53   
    54     54   /*
    55         -** Add the ability to mark interfaces as deprecated.
           55  +** These no-op macros are used in front of interfaces to mark those
           56  +** interfaces as either deprecated or experimental.  New applications
           57  +** should not use deprecated intrfaces - they are support for backwards
           58  +** compatibility only.  Application writers should be aware that
           59  +** experimental interfaces are subject to change in point releases.
           60  +**
           61  +** These macros used to resolve to various kinds of compiler magic that
           62  +** would generate warning messages when they were used.  But that
           63  +** compiler magic ended up generating such a flurry of bug reports
           64  +** that we have taken it all out and gone back to using simple
           65  +** noop macros.
    56     66   */
    57         -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
    58         -  /* GCC added the deprecated attribute in version 3.1 */
    59         -  #define SQLITE_DEPRECATED __attribute__ ((deprecated))
    60         -#elif defined(_MSC_VER) && (_MSC_VER>1200) 
    61         -  #define SQLITE_DEPRECATED __declspec(deprecated)
    62         -#else
    63         -  #define SQLITE_DEPRECATED
    64         -#endif
    65         -
    66         -/*
    67         -** Add the ability to mark interfaces as experimental.
    68         -*/
    69         -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    70         -  /* I can confirm that it does not work on version 4.1.0... */
    71         -  /* First appears in GCC docs for version 4.3.0 */
    72         -  #define SQLITE_EXPERIMENTAL __attribute__ ((warning ("is experimental")))
    73         -#elif defined(_MSC_VER) && (_MSC_VER>1200) 
    74         -  #define SQLITE_EXPERIMENTAL __declspec(deprecated("was declared experimental"))
    75         -#else
    76         -  #define SQLITE_EXPERIMENTAL
    77         -#endif
           67  +#define SQLITE_DEPRECATED
           68  +#define SQLITE_EXPERIMENTAL
    78     69   
    79     70   /*
    80     71   ** Ensure these symbols were not defined by some previous header file.
    81     72   */
    82     73   #ifdef SQLITE_VERSION
    83     74   # undef SQLITE_VERSION
    84     75   #endif