gtk-rs / gtk-rs-core

Rust bindings for GNOME libraries
https://gtk-rs.org/gtk-rs-core
MIT License
272 stars 104 forks source link

glib: Use a reference to a pointer of correct mutability for from_gli… #1375

Closed sdroege closed 2 months ago

sdroege commented 2 months ago

…b_ptr_borrow()

This hopefully makes it easier to use and harder to get the returned lifetime wrong.

Fixes https://github.com/gtk-rs/gtk-rs-core/issues/1373


CC @sophie-h

sdroege commented 2 months ago

Also need to update gstreamer-rs after merging this.

sophie-h commented 2 months ago

I'm not entirely sure why, but

[patch.crates-io]
gdk4 = { git = "https://github.com/gtk-rs/gtk4.git", version = "0.9.0" }

[patch."https://github.com/gtk-rs/gtk-rs-core"]
glib = { git = "https://github.com/sdroege/gtk-rs-core.git", version = "0.20.0", rev = "99d8abfc9e28a00282a3c79687556523a0c6acd2" }

Throws a million build errors at me. But the code looks like it's doing what I want :)