Skip to content

Commit

Permalink
fix: sqlite update_hook char types (#3288)
Browse files Browse the repository at this point in the history
Use "c_char" instead of "i8" as it resolves to the correct string type
on different architectures.

Fixes: #3287
  • Loading branch information
jasonish committed Jul 22, 2024
1 parent 940d9fb commit c50572e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sqlx-sqlite/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::cmp::Ordering;
use std::ffi::CStr;
use std::fmt::Write;
use std::fmt::{self, Debug, Formatter};
use std::os::raw::{c_int, c_void};
use std::os::raw::{c_char, c_int, c_void};
use std::panic::catch_unwind;
use std::ptr;
use std::ptr::NonNull;
Expand Down Expand Up @@ -262,8 +262,8 @@ where
extern "C" fn update_hook<F>(
callback: *mut c_void,
op_code: c_int,
database: *const i8,
table: *const i8,
database: *const c_char,
table: *const c_char,
rowid: i64,
) where
F: FnMut(UpdateHookResult),
Expand Down

0 comments on commit c50572e

Please sign in to comment.