Skip to content

Commit

Permalink
address windows issues, update with diff from issue #26
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyletang committed Aug 15, 2014
1 parent 9a833fd commit 463df50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cairo/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/gtk/traits/recentchooser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ pub trait RecentChooser: traits::Widget {
}

fn get_uris(&self) -> Option<Vec<String>> {
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() {
None
} 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)
Expand Down
8 changes: 4 additions & 4 deletions src/gtk/widgets/recentinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -148,17 +148,17 @@ impl RecentInfo {
_ => false
}
}

pub fn get_groups(&self) -> Option<Vec<String>> {
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() {
None
} 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)
Expand Down

0 comments on commit 463df50

Please sign in to comment.