Fix callback userdata mutability
In some places, building userdata
for FnMut
callbacks consisted in taking an immutable reference to the user provided function, before converting it to a mutable pointer. This was UB and could lead to future optimizations considering a closure's captured context is immutable.
See also:
- gir update: https://github.com/gtk-rs/gir/pull/1614
- gtk-rs-core update: https://github.com/gtk-rs/gtk-rs-core/pull/1566
TODO:
-
update gir submodule & regenerate when matching PR is merged.
Edited by François Laignel