/ Check-in [31e8cf7f]
Login

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

Overview
Comment:Work around issues with certain C++ compilers by adding a typedef to sqlite3.h. Ticket #2191. (CVS 3603)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:31e8cf7f30afe14f0866ea71eebbda9755ddedf8
User & Date: drh 2007-01-26 00:51:44
Context
2007-01-26
13:08
Make sure the loadext.c module works even if all SQLITE_OMIT macros are defined. Tickets #2184 and #2069. (CVS 3604) check-in: e1fae43c user: drh tags: trunk
00:51
Work around issues with certain C++ compilers by adding a typedef to sqlite3.h. Ticket #2191. (CVS 3603) check-in: 31e8cf7f user: drh tags: trunk
2007-01-25
16:56
Fix an additional problem with the IS NULL optimization on LEFT JOINs. Ticket #2189. See also ticket #2177. (CVS 3602) check-in: 358dd82d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This header file defines the interface that the SQLite library
    13     13   ** presents to client programs.
    14     14   **
    15         -** @(#) $Id: sqlite.h.in,v 1.197 2007/01/10 12:57:29 drh Exp $
           15  +** @(#) $Id: sqlite.h.in,v 1.198 2007/01/26 00:51:44 drh Exp $
    16     16   */
    17     17   #ifndef _SQLITE3_H_
    18     18   #define _SQLITE3_H_
    19     19   #include <stdarg.h>     /* Needed for the definition of va_list */
    20     20   
    21     21   /*
    22     22   ** Make sure we can call this stuff from C++.
................................................................................
  1181   1181   ** These are special value for the destructor that is passed in as the
  1182   1182   ** final argument to routines like sqlite3_result_blob().  If the destructor
  1183   1183   ** argument is SQLITE_STATIC, it means that the content pointer is constant
  1184   1184   ** and will never change.  It does not need to be destroyed.  The 
  1185   1185   ** SQLITE_TRANSIENT value means that the content will likely change in
  1186   1186   ** the near future and that SQLite should make its own private copy of
  1187   1187   ** the content before returning.
         1188  +**
         1189  +** The typedef is necessary to work around problems in certain
         1190  +** C++ compilers.  See ticket #2191.
  1188   1191   */
  1189         -#define SQLITE_STATIC      ((void(*)(void *))0)
  1190         -#define SQLITE_TRANSIENT   ((void(*)(void *))-1)
         1192  +typedef void (*sqlite3_destructor_type)(void*);
         1193  +#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
         1194  +#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
  1191   1195   
  1192   1196   /*
  1193   1197   ** User-defined functions invoke the following routines in order to
  1194   1198   ** set their return value.
  1195   1199   */
  1196   1200   void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
  1197   1201   void sqlite3_result_double(sqlite3_context*, double);