[librsvg] drawing_ctx.rs: Return values of gboolean map to glib_sys::gboolean, not bool



commit 403683964947098a0dfc4fa6680605b26b73e66c
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Apr 26 15:37:28 2017 -0500

    drawing_ctx.rs: Return values of gboolean map to glib_sys::gboolean, not bool

 rust/src/drawing_ctx.rs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/rust/src/drawing_ctx.rs b/rust/src/drawing_ctx.rs
index 5395807..a96286a 100644
--- a/rust/src/drawing_ctx.rs
+++ b/rust/src/drawing_ctx.rs
@@ -1,3 +1,4 @@
+extern crate glib_sys;
 extern crate glib;
 extern crate cairo;
 extern crate cairo_sys;
@@ -58,8 +59,8 @@ extern "C" {
     fn rsvg_state_new () -> *mut RsvgState;
     fn rsvg_state_reinit (state: *mut RsvgState);
     fn rsvg_state_reconstruct (state: *mut RsvgState, node: *const RsvgNode);
-    fn rsvg_state_is_overflow (state: *const RsvgState) -> bool;
-    fn rsvg_state_get_cond_true (state: *const RsvgState) -> bool;
+    fn rsvg_state_is_overflow (state: *const RsvgState) -> glib_sys::gboolean;
+    fn rsvg_state_get_cond_true (state: *const RsvgState) -> glib_sys::gboolean;
 
     fn rsvg_state_push (draw_ctx: *const RsvgDrawingCtx);
     fn rsvg_state_pop (draw_ctx: *const RsvgDrawingCtx);
@@ -208,11 +209,11 @@ pub fn state_reconstruct (state: *mut RsvgState, node: *const RsvgNode) {
 }
 
 pub fn state_is_overflow (state: *const RsvgState) -> bool {
-    unsafe { rsvg_state_is_overflow (state) }
+    unsafe { from_glib (rsvg_state_is_overflow (state)) }
 }
 
 pub fn state_get_cond_true (state: *const RsvgState) -> bool {
-    unsafe { rsvg_state_get_cond_true (state) }
+    unsafe { from_glib (rsvg_state_get_cond_true (state)) }
 }
 
 pub fn state_push (draw_ctx: *const RsvgDrawingCtx) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]