From b2c31421494f318045243b7512f0a205ce9ca4f6 Mon Sep 17 00:00:00 2001 From: Avinash Sajjanshetty Date: Thu, 15 Feb 2024 22:42:42 +0530 Subject: [PATCH] fix crsqlite: remove `pLibsqlModule` references --- libsql-sqlite3/ext/crr/rs/core/src/create_cl_set_vtab.rs | 4 ++-- libsql-sqlite3/ext/crr/rs/core/src/unpack_columns_vtab.rs | 4 ++-- libsql-sqlite3/ext/crr/src/changes-vtab.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libsql-sqlite3/ext/crr/rs/core/src/create_cl_set_vtab.rs b/libsql-sqlite3/ext/crr/rs/core/src/create_cl_set_vtab.rs index 34fd16839b..649cbafab0 100644 --- a/libsql-sqlite3/ext/crr/rs/core/src/create_cl_set_vtab.rs +++ b/libsql-sqlite3/ext/crr/rs/core/src/create_cl_set_vtab.rs @@ -140,8 +140,6 @@ fn connect_create_shared( nRef: 0, pModule: core::ptr::null(), zErrMsg: core::ptr::null_mut(), - #[cfg(feature = "libsql")] - pLibsqlModule: core::ptr::null_mut(), }, base_table_name: base_name_from_virtual_name(args.table_name).to_owned(), db_name: args.database_name.to_owned(), @@ -259,6 +257,8 @@ static MODULE: sqlite_nostd::module = sqlite_nostd::module { xRollbackTo: None, xShadowName: None, xIntegrity: None, + reserved: [None, None, None, None, None], + xPreparedSql: None, }; pub fn create_module(db: *mut sqlite::sqlite3) -> Result { diff --git a/libsql-sqlite3/ext/crr/rs/core/src/unpack_columns_vtab.rs b/libsql-sqlite3/ext/crr/rs/core/src/unpack_columns_vtab.rs index 036b419b00..bb12781a46 100644 --- a/libsql-sqlite3/ext/crr/rs/core/src/unpack_columns_vtab.rs +++ b/libsql-sqlite3/ext/crr/rs/core/src/unpack_columns_vtab.rs @@ -38,8 +38,6 @@ extern "C" fn connect( nRef: 0, pModule: core::ptr::null(), zErrMsg: core::ptr::null_mut(), - #[cfg(feature = "libsql")] - pLibsqlModule: core::ptr::null_mut(), })); let _ = sqlite::vtab_config(db, sqlite::INNOCUOUS); } @@ -256,6 +254,8 @@ static MODULE: sqlite_nostd::module = sqlite_nostd::module { xRollbackTo: None, xShadowName: None, xIntegrity: None, + reserved: [None, None, None, None, None], + xPreparedSql: None, }; /** diff --git a/libsql-sqlite3/ext/crr/src/changes-vtab.c b/libsql-sqlite3/ext/crr/src/changes-vtab.c index 923f683918..e1815c49df 100644 --- a/libsql-sqlite3/ext/crr/src/changes-vtab.c +++ b/libsql-sqlite3/ext/crr/src/changes-vtab.c @@ -179,6 +179,7 @@ sqlite3_module crsql_changesModule = { /* xShadowName */ 0 #ifdef LIBSQL , + /* reserved */ NULL, /* xPreparedSql */ 0 #endif };