diff options
author | drh <> | 2023-09-11 14:55:05 +0000 |
---|---|---|
committer | drh <> | 2023-09-11 14:55:05 +0000 |
commit | a9d788f08ff9909e861aa9e4e084f500a1c076a4 (patch) | |
tree | 59aaf34844b55ebafb812381be61c29b5d7ccefe /src/sqliteInt.h | |
parent | ef2e43304eac85a6d7ed669f41c04c7cb344f18c (diff) | |
parent | 7fa8d65539ae661fe9f4ba59a49050d4101cfa9e (diff) | |
download | sqlite-a9d788f08ff9909e861aa9e4e084f500a1c076a4.tar.gz sqlite-a9d788f08ff9909e861aa9e4e084f500a1c076a4.zip |
Add support for the sqlite3_get_clientdata() and sqlite3_set_clientdata()
interfaces, to better support JNI.
FossilOrigin-Name: 9806c0dd2802d68b67c25c4f3347ed532f9a98b051e775d34e9182dd2f099891
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 03a8a1a90..31eac3749 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1273,6 +1273,7 @@ typedef struct Column Column; typedef struct Cte Cte; typedef struct CteUse CteUse; typedef struct Db Db; +typedef struct DbClientData DbClientData; typedef struct DbFixer DbFixer; typedef struct Schema Schema; typedef struct Expr Expr; @@ -1751,6 +1752,7 @@ struct sqlite3 { i64 nDeferredCons; /* Net deferred constraints this transaction. */ i64 nDeferredImmCons; /* Net deferred immediate constraints */ int *pnBytesFreed; /* If not NULL, increment this in DbFree() */ + DbClientData *pDbData; /* sqlite3_set_clientdata() content */ #ifdef SQLITE_ENABLE_UNLOCK_NOTIFY /* The following variables are all protected by the STATIC_MAIN ** mutex, not by sqlite3.mutex. They are used by code in notify.c. @@ -4358,6 +4360,16 @@ struct CteUse { }; +/* Client data associated with sqlite3_set_clientdata() and +** sqlite3_get_clientdata(). +*/ +struct DbClientData { + DbClientData *pNext; /* Next in a linked list */ + void *pData; /* The data */ + void (*xDestructor)(void*); /* Destructor. Might be NULL */ + char zName[1]; /* Name of this client data. MUST BE LAST */ +}; + #ifdef SQLITE_DEBUG /* ** An instance of the TreeView object is used for printing the content of |