[librsvg] css: The DocHandlerData is our closure data; it should be mutable
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] css: The DocHandlerData is our closure data; it should be mutable
- Date: Tue, 27 Nov 2018 14:42:34 +0000 (UTC)
commit 0da03c3f7fd405b2bc3d6aad0e3f2820a9635ac7
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Nov 27 07:38:51 2018 -0600
css: The DocHandlerData is our closure data; it should be mutable
rsvg_internals/src/css.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 76566fa8..3f48ddf2 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -91,7 +91,7 @@ pub fn parse_into_handle(handle: *mut RsvgHandle, buf: &str) {
}
unsafe {
- let handler_data = DocHandlerData {
+ let mut handler_data = DocHandlerData {
handle,
selector: ptr::null_mut(),
};
@@ -99,7 +99,7 @@ pub fn parse_into_handle(handle: *mut RsvgHandle, buf: &str) {
let doc_handler = cr_doc_handler_new();
init_cr_doc_handler(&mut *doc_handler);
- (*doc_handler).app_data = &handler_data as *const _ as gpointer;
+ (*doc_handler).app_data = &mut handler_data as *mut _ as gpointer;
let buf_ptr = buf.as_ptr() as *mut _;
let buf_len = buf.len() as libc::c_ulong;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]