Skip to content

Commit 0857a73

Browse files
gtk: mark some of TextIter methods as nullable
1 parent 2a74d32 commit 0857a73

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gtk4/Gir.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,10 @@ status = "generate"
19351935
boxed_inline = true
19361936
[[object.derive]]
19371937
name = "Debug"
1938+
[[object.function]]
1939+
pattern = "(get_child_anchor|get_paintable)"
1940+
[object.function.return]
1941+
nullable = true # Drop on next gir-files update, see https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4401/
19381942

19391943
[[object]]
19401944
name = "Gtk.TextTag"

gtk4/src/auto/text_iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl TextIter {
553553

554554
#[doc(alias = "gtk_text_iter_get_child_anchor")]
555555
#[doc(alias = "get_child_anchor")]
556-
pub fn child_anchor(&self) -> TextChildAnchor {
556+
pub fn child_anchor(&self) -> Option<TextChildAnchor> {
557557
unsafe { from_glib_none(ffi::gtk_text_iter_get_child_anchor(self.to_glib_none().0)) }
558558
}
559559

@@ -599,7 +599,7 @@ impl TextIter {
599599

600600
#[doc(alias = "gtk_text_iter_get_paintable")]
601601
#[doc(alias = "get_paintable")]
602-
pub fn paintable(&self) -> gdk::Paintable {
602+
pub fn paintable(&self) -> Option<gdk::Paintable> {
603603
unsafe { from_glib_none(ffi::gtk_text_iter_get_paintable(self.to_glib_none().0)) }
604604
}
605605

0 commit comments

Comments
 (0)