Skip to content

Commit

Permalink
fix: sqlite update_hook char types
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 Jun 13, 2024
1 parent 1388fc8 commit 915f8df
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_int, c_void, c_char};
use std::panic::catch_unwind;
use std::ptr::NonNull;

Expand Down Expand Up @@ -261,8 +261,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 915f8df

Please sign in to comment.