From 740048bc63da907c7bac3f8f5065274479e964f3 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Thu, 28 Jul 2016 22:38:31 +0000 Subject: [PATCH] Make sure all the auto-extension mechanism function signatures match up precisely. --- src/loadext.c | 4 ++-- src/sqlite.h.in | 5 +++-- src/sqlite3ext.h | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/loadext.c b/src/loadext.c index 525272d7fe..c3d91eed33 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -676,7 +676,7 @@ static SQLITE_WSD struct sqlite3AutoExtList { ** loaded by every new database connection. */ int sqlite3_auto_extension( - void (*xInit)(sqlite3 *, char **, const void *) /* Extension entry point */ + void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_AUTOINIT @@ -723,7 +723,7 @@ int sqlite3_auto_extension( ** was not on the list. */ int sqlite3_cancel_auto_extension( - void (*xInit)(sqlite3 *, char **, const void *) /* Extension entry point */ + void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 104e465467..9fec987d8c 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -5707,8 +5707,9 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] */ +typedef struct sqlite3_api_routines sqlite3_api_routines; int sqlite3_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const void *) + void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* @@ -5722,7 +5723,7 @@ int sqlite3_auto_extension( ** routines. */ int sqlite3_cancel_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const void *) + void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index d79ca826de..8ee8e2d576 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -251,12 +251,13 @@ struct sqlite3_api_routines { 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(*)(sqlite3*,char**,const void*)); + int (*auto_extension)(void(*)(sqlite3*,char**,const sqlite3_api_routines*)); 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(*)(sqlite3*,char**,const void*)); + int (*cancel_auto_extension)(void(*)(sqlite3*,char**, + const sqlite3_api_routines*)); int (*load_extension)(sqlite3*,const char*,const char*,char**); void *(*malloc64)(sqlite3_uint64); sqlite3_uint64 (*msize)(void*); -- 2.11.4.GIT