fix: sqlite update_hook char types (#3288)

Use "c_char" instead of "i8" as it resolves to the correct string type
on different architectures.

Fixes: #3287
This commit is contained in:
Jason Ish 2024-07-22 16:26:47 -06:00 committed by GitHub
parent 940d9fb994
commit c50572eef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
@ -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),