From 463df506846b2025788161924adfef9f6173e040 Mon Sep 17 00:00:00 2001 From: JeremyLetang Date: Fri, 15 Aug 2014 09:23:32 +0200 Subject: [PATCH] address windows issues, update with diff from issue #26 --- src/cairo/fonts.rs | 2 +- src/gtk/traits/recentchooser.rs | 4 ++-- src/gtk/widgets/recentinfo.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cairo/fonts.rs b/src/cairo/fonts.rs index 26725c1..ebe2ed6 100644 --- a/src/cairo/fonts.rs +++ b/src/cairo/fonts.rs @@ -111,7 +111,7 @@ impl FontOptions{ pub fn hash(&self) -> u64{ unsafe{ - ffi::cairo_font_options_hash(self.get_ptr()) + ffi::cairo_font_options_hash(self.get_ptr()) as u64 } } diff --git a/src/gtk/traits/recentchooser.rs b/src/gtk/traits/recentchooser.rs index 51a83f2..2b8486b 100644 --- a/src/gtk/traits/recentchooser.rs +++ b/src/gtk/traits/recentchooser.rs @@ -176,7 +176,7 @@ pub trait RecentChooser: traits::Widget { } fn get_uris(&self) -> Option> { - let mut length = 0i64; + let mut length = 0; let tmp = unsafe { ffi::gtk_recent_chooser_get_uris(GTK_RECENT_CHOOSER(self.get_widget()), &mut length) }; if tmp.is_null() { @@ -184,7 +184,7 @@ pub trait RecentChooser: traits::Widget { } else { let mut ret = Vec::with_capacity(length as uint); - for count in range(0i64, length) { + for count in range(0, length) { ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) }); } Some(ret) diff --git a/src/gtk/widgets/recentinfo.rs b/src/gtk/widgets/recentinfo.rs index be2aa4d..d7d726f 100644 --- a/src/gtk/widgets/recentinfo.rs +++ b/src/gtk/widgets/recentinfo.rs @@ -123,7 +123,7 @@ impl RecentInfo { } else { let mut ret = Vec::with_capacity(length as uint); - for count in range(0i64, length) { + for count in range(0, length) { ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) }); } Some(ret) @@ -148,9 +148,9 @@ impl RecentInfo { _ => false } } - + pub fn get_groups(&self) -> Option> { - let mut length = 0i64; + let mut length = 0; let tmp = unsafe { ffi::gtk_recent_info_get_groups(GTK_RECENT_INFO(self.get_widget()), &mut length) }; if tmp.is_null() { @@ -158,7 +158,7 @@ impl RecentInfo { } else { let mut ret = Vec::with_capacity(length as uint); - for count in range(0i64, length) { + for count in range(0, length) { ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) }); } Some(ret)