Skip to content

Commit

Permalink
use &self for SelectionData::set(), fix gtk-rs#747
Browse files Browse the repository at this point in the history
  • Loading branch information
jsparber authored and GuillaumeGomez committed Feb 5, 2019
1 parent 5e3b197 commit 7f36cda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Gir.toml
Expand Up @@ -1390,6 +1390,11 @@ status = "generate"
name = "selection_data"
const = true
[[object.function]]
name = "set"
[[object.function.parameter]]
name = "selection_data"
const = true
[[object.function]]
name = "set_uris"
[[object.function.parameter]]
name = "selection_data"
Expand Down
4 changes: 2 additions & 2 deletions src/auto/selection_data.rs
Expand Up @@ -95,10 +95,10 @@ impl SelectionData {
}
}

pub fn set(&mut self, type_: &gdk::Atom, format: i32, data: &[u8]) {
pub fn set(&self, type_: &gdk::Atom, format: i32, data: &[u8]) {
let length = data.len() as i32;
unsafe {
ffi::gtk_selection_data_set(self.to_glib_none_mut().0, type_.to_glib_none().0, format, data.to_glib_none().0, length);
ffi::gtk_selection_data_set(mut_override(self.to_glib_none().0), type_.to_glib_none().0, format, data.to_glib_none().0, length);
}
}

Expand Down

0 comments on commit 7f36cda

Please sign in to comment.