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 {
200
200
// so code outside of the `catch_unwind` call must never panic.
201
201
extern "C" fn write_callback < W : io:: Write + ' static > (
202
202
env : * mut c_void ,
203
- data : * mut c_uchar ,
203
+ data : * const c_uchar ,
204
204
length : c_uint ,
205
205
) -> ffi:: cairo_status_t {
206
206
// 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> {
57
57
58
58
unsafe extern "C" fn write_func < W : Write > (
59
59
closure : * mut c_void ,
60
- data : * mut u8 ,
60
+ data : * const u8 ,
61
61
len : c_uint ,
62
62
) -> crate :: ffi:: cairo_status_t {
63
63
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)>;
262
262
pub type cairo_read_func_t =
263
263
Option < unsafe extern "C" fn ( * mut c_void , * mut c_uchar , c_uint ) -> cairo_status_t > ;
264
264
pub 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 > ;
266
266
267
267
#[ cfg( feature = "freetype" ) ]
268
268
#[ cfg_attr( docsrs, doc( cfg( feature = "freetype" ) ) ) ]
You can’t perform that action at this time.
0 commit comments