/ Check-in [bf1ceced]
Login

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

Overview
Comment:Update the loadable extension module to include recently added interfaces. (CVS 4886)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bf1cecede88d2a21eb4891a343f3c19bb5416263
User & Date: drh 2008-03-19 19:55:55
Context
2008-03-19
20:18
Use the xCurrentTime method of the default VFS instead of stdlib time() to get the current time when compiling with SQLITE_OMIT_DATETIME_FUNCS. (CVS 4887) check-in: 73fbac7c user: drh tags: trunk
19:55
Update the loadable extension module to include recently added interfaces. (CVS 4886) check-in: bf1ceced user: drh tags: trunk
19:01
Initialize the MD5 SQL functions from test_func.c instead of using conditional compilation in tclsqlite.c. (CVS 4885) check-in: 801a0e3c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/loadext.c.

   292    292     sqlite3_vfs_find,
   293    293     sqlite3_vfs_register,
   294    294     sqlite3_vfs_unregister,
   295    295   
   296    296     /*
   297    297     ** Added for 3.5.8
   298    298     */
          299  +  sqlite3_threadsafe,
          300  +  sqlite3_result_zeroblob,
          301  +  sqlite3_result_error_code,
          302  +  sqlite3_test_control,
   299    303     sqlite3_randomness,
   300    304   };
   301    305   
   302    306   /*
   303    307   ** Attempt to load an SQLite extension library contained in the file
   304    308   ** zFile.  The entry point is zProc.  zProc may be 0 in which case a
   305    309   ** default entry point name (sqlite3_extension_init) is used.  Use

Changes to src/sqlite3ext.h.

    11     11   *************************************************************************
    12     12   ** This header file defines the SQLite interface for use by
    13     13   ** shared libraries that want to be imported as extensions into
    14     14   ** an SQLite instance.  Shared libraries that intend to be loaded
    15     15   ** as extensions by SQLite should #include this file instead of 
    16     16   ** sqlite3.h.
    17     17   **
    18         -** @(#) $Id: sqlite3ext.h,v 1.19 2008/03/19 14:15:35 drh Exp $
           18  +** @(#) $Id: sqlite3ext.h,v 1.20 2008/03/19 19:55:55 drh Exp $
    19     19   */
    20     20   #ifndef _SQLITE3EXT_H_
    21     21   #define _SQLITE3EXT_H_
    22     22   #include "sqlite3.h"
    23     23   
    24     24   typedef struct sqlite3_api_routines sqlite3_api_routines;
    25     25   
................................................................................
   178    178     void (*result_error_nomem)(sqlite3_context*);
   179    179     void (*result_error_toobig)(sqlite3_context*);
   180    180     int (*sleep)(int);
   181    181     void (*soft_heap_limit)(int);
   182    182     sqlite3_vfs *(*vfs_find)(const char*);
   183    183     int (*vfs_register)(sqlite3_vfs*,int);
   184    184     int (*vfs_unregister)(sqlite3_vfs*);
          185  +  int (*xthreadsafe)(void);
          186  +  void (*result_zeroblob)(sqlite3_context*,int);
          187  +  void (*result_error_code)(sqlite3_context*,int);
          188  +  int (*test_control)(int, ...);
   185    189     void (*randomness)(int,void*);
   186    190   };
   187    191   
   188    192   /*
   189    193   ** The following macros redefine the API routines so that they are
   190    194   ** redirected throught the global sqlite3_api structure.
   191    195   **
................................................................................
   339    343   #define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
   340    344   #define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
   341    345   #define sqlite3_sleep                  sqlite3_api->sleep
   342    346   #define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
   343    347   #define sqlite3_vfs_find               sqlite3_api->vfs_find
   344    348   #define sqlite3_vfs_register           sqlite3_api->vfs_register
   345    349   #define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
          350  +#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
          351  +#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
          352  +#define sqlite3_result_error_code      sqlite3_api->result_error_code
          353  +#define sqlite3_test_control           sqlite3_api->test_control
   346    354   #define sqlite3_randomness             sqlite3_api->randomness
   347    355   #endif /* SQLITE_CORE */
   348    356   
   349    357   #define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api;
   350    358   #define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;
   351    359   
   352    360   #endif /* _SQLITE3EXT_H_ */