Skip to content

expose the libsql_close_hook to loadable extensions #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/sqlite3ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ struct libsql_api_routines {
struct libsql_wal_methods *(*wal_methods_find)(const char *);
int (*wal_methods_register)(struct libsql_wal_methods*);
int (*wal_methods_unregister)(struct libsql_wal_methods*);
void *(*close_hook)(sqlite3*, void(*)(void*,sqlite3*), void *pArg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that one will be available in libSQL 0.2.3 - let's add a comment, following SQLite style above

};

/*
Expand Down Expand Up @@ -705,6 +706,8 @@ typedef int (*sqlite3_loadext_entry)(
#define libsql_wal_methods_find libsql_api->wal_methods_find
#define libsql_wal_methods_register libsql_api->wal_methods_register
#define libsql_wal_methods_unregister libsql_api->wal_methods_unregister
/* libSQL 0.2.3 */
#define libsql_close_hook libsql_api->close_hook
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */

#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
Expand Down