Diff for /elwix/files/sqlite/dist/sqlite3ext.h between versions 1.2 and 1.3

version 1.2, 2012/10/12 08:22:47 version 1.3, 2017/02/13 16:52:50
Line 15 Line 15
 ** as extensions by SQLite should #include this file instead of   ** as extensions by SQLite should #include this file instead of 
 ** sqlite3.h.  ** sqlite3.h.
 */  */
#ifndef _SQLITE3EXT_H_#ifndef SQLITE3EXT_H
#define _SQLITE3EXT_H_#define SQLITE3EXT_H
 #include "sqlite3.h"  #include "sqlite3.h"
   
 typedef struct sqlite3_api_routines sqlite3_api_routines;  
   
 /*  /*
 ** The following structure holds pointers to all of the SQLite API  ** The following structure holds pointers to all of the SQLite API
 ** routines.  ** routines.
Line 28  typedef struct sqlite3_api_routines sqlite3_api_routin Line 26  typedef struct sqlite3_api_routines sqlite3_api_routin
 ** WARNING:  In order to maintain backwards compatibility, add new  ** WARNING:  In order to maintain backwards compatibility, add new
 ** interfaces to the end of this structure only.  If you insert new  ** interfaces to the end of this structure only.  If you insert new
 ** interfaces in the middle of this structure, then older different  ** interfaces in the middle of this structure, then older different
** versions of SQLite will not be able to load each others' shared** versions of SQLite will not be able to load each other's shared
 ** libraries!  ** libraries!
 */  */
 struct sqlite3_api_routines {  struct sqlite3_api_routines {
Line 236  struct sqlite3_api_routines { Line 234  struct sqlite3_api_routines {
   int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);    int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
   int (*vtab_config)(sqlite3*,int op,...);    int (*vtab_config)(sqlite3*,int op,...);
   int (*vtab_on_conflict)(sqlite3*);    int (*vtab_on_conflict)(sqlite3*);
     /* Version 3.7.16 and later */
     int (*close_v2)(sqlite3*);
     const char *(*db_filename)(sqlite3*,const char*);
     int (*db_readonly)(sqlite3*,const char*);
     int (*db_release_memory)(sqlite3*);
     const char *(*errstr)(int);
     int (*stmt_busy)(sqlite3_stmt*);
     int (*stmt_readonly)(sqlite3_stmt*);
     int (*stricmp)(const char*,const char*);
     int (*uri_boolean)(const char*,const char*,int);
     sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
     const char *(*uri_parameter)(const char*,const char*);
     char *(*vsnprintf)(int,char*,const char*,va_list);
     int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
     /* Version 3.8.7 and later */
     int (*auto_extension)(void(*)(void));
     int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,
                        void(*)(void*));
     int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,
                         void(*)(void*),unsigned char);
     int (*cancel_auto_extension)(void(*)(void));
     int (*load_extension)(sqlite3*,const char*,const char*,char**);
     void *(*malloc64)(sqlite3_uint64);
     sqlite3_uint64 (*msize)(void*);
     void *(*realloc64)(void*,sqlite3_uint64);
     void (*reset_auto_extension)(void);
     void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,
                           void(*)(void*));
     void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
                            void(*)(void*), unsigned char);
     int (*strglob)(const char*,const char*);
     /* Version 3.8.11 and later */
     sqlite3_value *(*value_dup)(const sqlite3_value*);
     void (*value_free)(sqlite3_value*);
     int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
     int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
     /* Version 3.9.0 and later */
     unsigned int (*value_subtype)(sqlite3_value*);
     void (*result_subtype)(sqlite3_context*,unsigned int);
     /* Version 3.10.0 and later */
     int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
     int (*strlike)(const char*,const char*,unsigned int);
     int (*db_cacheflush)(sqlite3*);
     /* Version 3.12.0 and later */
     int (*system_errno)(sqlite3*);
     /* Version 3.14.0 and later */
     int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
     char *(*expanded_sql)(sqlite3_stmt*);
 };  };
   
 /*  /*
   ** This is the function signature used for all extension entry points.  It
   ** is also defined in the file "loadext.c".
   */
   typedef int (*sqlite3_loadext_entry)(
     sqlite3 *db,                       /* Handle to the database. */
     char **pzErrMsg,                   /* Used to set error string on failure. */
     const sqlite3_api_routines *pThunk /* Extension API function pointers. */
   );
   
   /*
 ** The following macros redefine the API routines so that they are  ** The following macros redefine the API routines so that they are
** redirected throught the global sqlite3_api structure.** redirected through the global sqlite3_api structure.
 **  **
 ** This header file is also used by the loadext.c source file  ** This header file is also used by the loadext.c source file
 ** (part of the main SQLite library - not an extension) so that  ** (part of the main SQLite library - not an extension) so that
Line 249  struct sqlite3_api_routines { Line 305  struct sqlite3_api_routines {
 ** the API.  So the redefinition macros are only valid if the  ** the API.  So the redefinition macros are only valid if the
 ** SQLITE_CORE macros is undefined.  ** SQLITE_CORE macros is undefined.
 */  */
#ifndef SQLITE_CORE#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
 #define sqlite3_aggregate_context      sqlite3_api->aggregate_context  #define sqlite3_aggregate_context      sqlite3_api->aggregate_context
 #ifndef SQLITE_OMIT_DEPRECATED  #ifndef SQLITE_OMIT_DEPRECATED
 #define sqlite3_aggregate_count        sqlite3_api->aggregate_count  #define sqlite3_aggregate_count        sqlite3_api->aggregate_count
Line 376  struct sqlite3_api_routines { Line 432  struct sqlite3_api_routines {
 #define sqlite3_value_text16le         sqlite3_api->value_text16le  #define sqlite3_value_text16le         sqlite3_api->value_text16le
 #define sqlite3_value_type             sqlite3_api->value_type  #define sqlite3_value_type             sqlite3_api->value_type
 #define sqlite3_vmprintf               sqlite3_api->vmprintf  #define sqlite3_vmprintf               sqlite3_api->vmprintf
   #define sqlite3_vsnprintf              sqlite3_api->vsnprintf
 #define sqlite3_overload_function      sqlite3_api->overload_function  #define sqlite3_overload_function      sqlite3_api->overload_function
 #define sqlite3_prepare_v2             sqlite3_api->prepare_v2  #define sqlite3_prepare_v2             sqlite3_api->prepare_v2
 #define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2  #define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
Line 439  struct sqlite3_api_routines { Line 496  struct sqlite3_api_routines {
 #define sqlite3_blob_reopen            sqlite3_api->blob_reopen  #define sqlite3_blob_reopen            sqlite3_api->blob_reopen
 #define sqlite3_vtab_config            sqlite3_api->vtab_config  #define sqlite3_vtab_config            sqlite3_api->vtab_config
 #define sqlite3_vtab_on_conflict       sqlite3_api->vtab_on_conflict  #define sqlite3_vtab_on_conflict       sqlite3_api->vtab_on_conflict
#endif /* SQLITE_CORE *//* Version 3.7.16 and later */
 #define sqlite3_close_v2               sqlite3_api->close_v2
 #define sqlite3_db_filename            sqlite3_api->db_filename
 #define sqlite3_db_readonly            sqlite3_api->db_readonly
 #define sqlite3_db_release_memory      sqlite3_api->db_release_memory
 #define sqlite3_errstr                 sqlite3_api->errstr
 #define sqlite3_stmt_busy              sqlite3_api->stmt_busy
 #define sqlite3_stmt_readonly          sqlite3_api->stmt_readonly
 #define sqlite3_stricmp                sqlite3_api->stricmp
 #define sqlite3_uri_boolean            sqlite3_api->uri_boolean
 #define sqlite3_uri_int64              sqlite3_api->uri_int64
 #define sqlite3_uri_parameter          sqlite3_api->uri_parameter
 #define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
 #define sqlite3_wal_checkpoint_v2      sqlite3_api->wal_checkpoint_v2
 /* Version 3.8.7 and later */
 #define sqlite3_auto_extension         sqlite3_api->auto_extension
 #define sqlite3_bind_blob64            sqlite3_api->bind_blob64
 #define sqlite3_bind_text64            sqlite3_api->bind_text64
 #define sqlite3_cancel_auto_extension  sqlite3_api->cancel_auto_extension
 #define sqlite3_load_extension         sqlite3_api->load_extension
 #define sqlite3_malloc64               sqlite3_api->malloc64
 #define sqlite3_msize                  sqlite3_api->msize
 #define sqlite3_realloc64              sqlite3_api->realloc64
 #define sqlite3_reset_auto_extension   sqlite3_api->reset_auto_extension
 #define sqlite3_result_blob64          sqlite3_api->result_blob64
 #define sqlite3_result_text64          sqlite3_api->result_text64
 #define sqlite3_strglob                sqlite3_api->strglob
 /* Version 3.8.11 and later */
 #define sqlite3_value_dup              sqlite3_api->value_dup
 #define sqlite3_value_free             sqlite3_api->value_free
 #define sqlite3_result_zeroblob64      sqlite3_api->result_zeroblob64
 #define sqlite3_bind_zeroblob64        sqlite3_api->bind_zeroblob64
 /* Version 3.9.0 and later */
 #define sqlite3_value_subtype          sqlite3_api->value_subtype
 #define sqlite3_result_subtype         sqlite3_api->result_subtype
 /* Version 3.10.0 and later */
 #define sqlite3_status64               sqlite3_api->status64
 #define sqlite3_strlike                sqlite3_api->strlike
 #define sqlite3_db_cacheflush          sqlite3_api->db_cacheflush
 /* Version 3.12.0 and later */
 #define sqlite3_system_errno           sqlite3_api->system_errno
 /* Version 3.14.0 and later */
 #define sqlite3_trace_v2               sqlite3_api->trace_v2
 #define sqlite3_expanded_sql           sqlite3_api->expanded_sql
 #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
   
#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;  /* 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;
 # define SQLITE_EXTENSION_INIT3     \
     extern const sqlite3_api_routines *sqlite3_api;
 #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 */
 # define SQLITE_EXTENSION_INIT3     /*no-op*/
 #endif
   
#endif /* _SQLITE3EXT_H_ */#endif /* SQLITE3EXT_H */

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>