[librsvg: 7/95] Sigh, pass C strings properly
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 7/95] Sigh, pass C strings properly
- Date: Thu, 22 Feb 2018 03:13:44 +0000 (UTC)
commit db897db4e5f5535dc17f0a37f0ba48ab025d092a
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Feb 8 07:07:44 2018 -0600
Sigh, pass C strings properly
rust/src/attributes.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rust/src/attributes.rs b/rust/src/attributes.rs
index 2aed14c6..02630a8a 100644
--- a/rust/src/attributes.rs
+++ b/rust/src/attributes.rs
@@ -52,7 +52,7 @@ mod tests {
#[test]
fn c_attribute_from_name() {
let mut a: Attribute = unsafe { mem::uninitialized() };
- let res: bool = from_glib(rsvg_attribute_from_name("width".as_ptr() as *const libc::c_char,
+ let res: bool = from_glib(rsvg_attribute_from_name("width".to_glib_none().0,
&mut a as *mut Attribute));
assert!(res);
assert_eq!(a, Attribute::Width);
@@ -61,7 +61,7 @@ mod tests {
#[test]
fn invalid_c_attribute_from_name() {
let mut a: Attribute = unsafe { mem::uninitialized() };
- let res: bool = from_glib(rsvg_attribute_from_name("foobar".as_ptr() as *const libc::c_char,
+ let res: bool = from_glib(rsvg_attribute_from_name("foobar".to_glib_none().0,
&mut a as *mut Attribute));
assert!(!res);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]