-
-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
Description
gtk-rs-core/cairo/sys/src/lib.rs
Lines 264 to 265 in 94c3909
pub type cairo_write_func_t = | |
Option<unsafe extern "C" fn(*mut c_void, *mut c_uchar, c_uint) -> cairo_status_t>; |
gtk-rs-core/cairo/src/surface_png.rs
Lines 58 to 62 in 94c3909
unsafe extern "C" fn write_func<W: Write>( | |
closure: *mut c_void, | |
data: *mut u8, | |
len: c_uint, | |
) -> crate::ffi::cairo_status_t { |
The corresponding C type takes a const unsigned char *data
.
My guess is this was a copy-paste error when adding both read_func and write_func, since read_func does need to take a mutable char pointer.