File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ struct MutableCallbackEnvironment {
200200// so code outside of the `catch_unwind` call must never panic.
201201extern "C" fn write_callback < W : io:: Write + ' static > (
202202 env : * mut c_void ,
203- data : * mut c_uchar ,
203+ data : * const c_uchar ,
204204 length : c_uint ,
205205) -> ffi:: cairo_status_t {
206206 // This is consistent with the type of `env` in `Surface::_for_stream`.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ struct WriteEnv<'a, W: 'a + Write> {
5757
5858unsafe extern "C" fn write_func < W : Write > (
5959 closure : * mut c_void ,
60- data : * mut u8 ,
60+ data : * const u8 ,
6161 len : c_uint ,
6262) -> crate :: ffi:: cairo_status_t {
6363 let write_env: & mut WriteEnv < W > = & mut * ( closure as * mut WriteEnv < W > ) ;
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ pub type cairo_destroy_func_t = Option<unsafe extern "C" fn(*mut c_void)>;
262262pub type cairo_read_func_t =
263263 Option < unsafe extern "C" fn ( * mut c_void , * mut c_uchar , c_uint ) -> cairo_status_t > ;
264264pub type cairo_write_func_t =
265- Option < unsafe extern "C" fn ( * mut c_void , * mut c_uchar , c_uint ) -> cairo_status_t > ;
265+ Option < unsafe extern "C" fn ( * mut c_void , * const c_uchar , c_uint ) -> cairo_status_t > ;
266266
267267#[ cfg( feature = "freetype" ) ]
268268#[ cfg_attr( docsrs, doc( cfg( feature = "freetype" ) ) ) ]
You can’t perform that action at this time.
0 commit comments