Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cairo/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ struct MutableCallbackEnvironment {
// so code outside of the `catch_unwind` call must never panic.
extern "C" fn write_callback<W: io::Write + 'static>(
env: *mut c_void,
data: *mut c_uchar,
data: *const c_uchar,
length: c_uint,
) -> ffi::cairo_status_t {
// This is consistent with the type of `env` in `Surface::_for_stream`.
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/surface_png.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct WriteEnv<'a, W: 'a + Write> {

unsafe extern "C" fn write_func<W: Write>(
closure: *mut c_void,
data: *mut u8,
data: *const u8,
len: c_uint,
) -> crate::ffi::cairo_status_t {
let write_env: &mut WriteEnv<W> = &mut *(closure as *mut WriteEnv<W>);
Expand Down
2 changes: 1 addition & 1 deletion cairo/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub type cairo_destroy_func_t = Option<unsafe extern "C" fn(*mut c_void)>;
pub type cairo_read_func_t =
Option<unsafe extern "C" fn(*mut c_void, *mut c_uchar, c_uint) -> cairo_status_t>;
pub type cairo_write_func_t =
Option<unsafe extern "C" fn(*mut c_void, *mut c_uchar, c_uint) -> cairo_status_t>;
Option<unsafe extern "C" fn(*mut c_void, *const c_uchar, c_uint) -> cairo_status_t>;

#[cfg(feature = "freetype")]
#[cfg_attr(docsrs, doc(cfg(feature = "freetype")))]
Expand Down
Loading