SQLite

Check-in [f301db3c23]
Login

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

Overview
Comment:Make the new sqlite3_vtab_collation() interface accessible to loadable extensions.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f301db3c2343fd2086bc5b69a17b2d226175584ccd09549ebb2cb603590da487
User & Date: drh 2018-01-16 20:50:37.717
Context
2018-01-16
21:00
Fix compiler warning in the FTS5 test interface. (check-in: 2ab4e8d5d8 user: drh tags: trunk)
20:50
Make the new sqlite3_vtab_collation() interface accessible to loadable extensions. (check-in: f301db3c23 user: drh tags: trunk)
20:44
Fix a test problem causing an error in fts5fault9.test. (check-in: 8e2048113f user: dan tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/loadext.c.
429
430
431
432
433
434
435
436


437
438
439
440
441
442
443
429
430
431
432
433
434
435

436
437
438
439
440
441
442
443
444







-
+
+







  sqlite3_prepare_v3,
  sqlite3_prepare16_v3,
  sqlite3_bind_pointer,
  sqlite3_result_pointer,
  sqlite3_value_pointer,
  /* Version 3.22.0 and later */
  sqlite3_vtab_nochange,
  sqlite3_value_nochange
  sqlite3_value_nochange,
  sqlite3_vtab_collation
};

/*
** Attempt to load an SQLite extension library contained in the file
** zFile.  The entry point is zProc.  zProc may be 0 in which case a
** default entry point name (sqlite3_extension_init) is used.  Use
** of the default name is recommended.
Changes to src/sqlite3ext.h.
290
291
292
293
294
295
296

297
298
299
300
301
302
303
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304







+







  int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
                      sqlite3_stmt**,const void**);
  int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
  void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
  void *(*value_pointer)(sqlite3_value*,const char*);
  int (*vtab_nochange)(sqlite3_context*);
  int (*value_nochange)(sqlite3_value*);
  const char *(*vtab_collation)(sqlite3_index_info*,int);
};

/*
** 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)(
559
560
561
562
563
564
565

566
567
568
569
570
571
572
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574







+







#define sqlite3_prepare16_v3           sqlite3_api->prepare16_v3
#define sqlite3_bind_pointer           sqlite3_api->bind_pointer
#define sqlite3_result_pointer         sqlite3_api->result_pointer
#define sqlite3_value_pointer          sqlite3_api->value_pointer
/* Version 3.22.0 and later */
#define sqlite3_vtab_nochange          sqlite3_api->vtab_nochange
#define sqlite3_value_nochange         sqltie3_api->value_nochange
#define sqlite3_vtab_collation         sqltie3_api->vtab_collation
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */

#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
  /* 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;