From f8d428c308f388e394560ed58cfae15cc9168ba4 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Tue, 18 Jun 2019 23:20:01 +0200 Subject: [PATCH] Make the SQLite struct opaque With the API changes already done, notably .is_open(), the implementation of the sqlite can and should now be private. This also doesn't need to be #[repr(C)] anymore since the C API does not need to access the fields in the struct. --- src/dc_sqlite3.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dc_sqlite3.rs b/src/dc_sqlite3.rs index 42be10256..ba5017ca6 100644 --- a/src/dc_sqlite3.rs +++ b/src/dc_sqlite3.rs @@ -12,9 +12,8 @@ use crate::x::*; const DC_OPEN_READONLY: usize = 0x01; /// A wrapper around the underlying Sqlite3 object. -#[repr(C)] pub struct SQLite { - pub cobj: std::sync::RwLock<*mut sqlite3>, + cobj: std::sync::RwLock<*mut sqlite3>, } impl SQLite {