mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 03:34:18 +01:00
Switch Connection to use Arc instead of Rc
Connection needs to be Arc so that bindings can wrap it with `Mutex` for multi-threading.
This commit is contained in:
@@ -5,7 +5,6 @@ use limbo_core::Value;
|
||||
use std::ffi::{self, CStr, CString};
|
||||
use tracing::trace;
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
macro_rules! stub {
|
||||
@@ -42,7 +41,7 @@ use util::sqlite3_safety_check_sick_or_ok;
|
||||
pub struct sqlite3 {
|
||||
pub(crate) io: Arc<dyn limbo_core::IO>,
|
||||
pub(crate) _db: Arc<limbo_core::Database>,
|
||||
pub(crate) conn: Rc<limbo_core::Connection>,
|
||||
pub(crate) conn: Arc<limbo_core::Connection>,
|
||||
pub(crate) err_code: ffi::c_int,
|
||||
pub(crate) err_mask: ffi::c_int,
|
||||
pub(crate) malloc_failed: bool,
|
||||
@@ -54,7 +53,7 @@ impl sqlite3 {
|
||||
pub fn new(
|
||||
io: Arc<dyn limbo_core::IO>,
|
||||
db: Arc<limbo_core::Database>,
|
||||
conn: Rc<limbo_core::Connection>,
|
||||
conn: Arc<limbo_core::Connection>,
|
||||
) -> Self {
|
||||
Self {
|
||||
io,
|
||||
|
||||
Reference in New Issue
Block a user