[librsvg] transform.rs: bool -> glib_sys::gboolean
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] transform.rs: bool -> glib_sys::gboolean
- Date: Wed, 26 Apr 2017 21:47:48 +0000 (UTC)
commit 1d4fa99863d199f80b9c31b82b95dc2a50c21ccc
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Apr 26 16:29:59 2017 -0500
transform.rs: bool -> glib_sys::gboolean
rust/src/transform.rs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/rust/src/transform.rs b/rust/src/transform.rs
index 2b52377..0287413 100644
--- a/rust/src/transform.rs
+++ b/rust/src/transform.rs
@@ -1,4 +1,5 @@
extern crate lalrpop_util;
+extern crate glib_sys;
extern crate glib;
extern crate libc;
@@ -42,7 +43,7 @@ fn make_rotation_matrix (angle_degrees: f64, tx: f64, ty: f64) -> cairo::Matrix
}
#[no_mangle]
-pub fn rsvg_parse_transform (out_matrix: *mut cairo::Matrix, s: *const libc::c_char) -> bool {
+pub fn rsvg_parse_transform (out_matrix: *mut cairo::Matrix, s: *const libc::c_char) -> glib_sys::gboolean {
assert! (!out_matrix.is_null ());
assert! (!s.is_null ());
@@ -52,12 +53,12 @@ pub fn rsvg_parse_transform (out_matrix: *mut cairo::Matrix, s: *const libc::c_c
match parse_transform (&string) {
Ok (m) => {
*matrix = m;
- true
+ true.to_glib ()
},
Err (_) => {
*matrix = cairo::Matrix::identity ();
- false
+ false.to_glib ()
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]