Add nullable override for constructors #290

Merged
merged 1 commit into from Nov 2, 2016

Projects

None yet

2 participants

@EPashkin
Member
EPashkin commented Nov 2, 2016

Fix #289
Also helps gtk-rs/gtk#387

@EPashkin
Member
EPashkin commented Nov 2, 2016

For change in Gir.toml

name = "Gtk.TreePath"
 status = "generate"
+     [[object.function]]
+     name = "new_from_string"
+        [object.function.return]
+        nullable = true

It do these changes in src/auto/tree_path.rs

-    pub fn new_from_string(path: &str) -> TreePath {
+    pub fn new_from_string(path: &str) -> Option<TreePath> {
         assert_initialized_main_thread!();
         unsafe {
             from_glib_full(ffi::gtk_tree_path_new_from_string(path.to_glib_none().0))
         }
     }
@EPashkin EPashkin Add nullable override for constructors
80f84c4
@gkoz
Member
gkoz commented Nov 2, 2016

Thanks!

@gkoz gkoz merged commit 3b3585f into gtk-rs:master Nov 2, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@EPashkin EPashkin deleted the EPashkin:nullable_constructors branch Nov 2, 2016
@thk1 thk1 referenced this pull request in gtk-rs/gtk Nov 2, 2016
Open

Adding TreeRowReference #387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment