gtk4-rs icon indicating copy to clipboard operation
gtk4-rs copied to clipboard

Investigate nullability of GskTransform

Open bilelmoussaoui opened this issue 3 years ago • 5 comments

Seems like a bunch of GskTransform methods returns a nullable but are not annotated as such...

cc @alatiera

bilelmoussaoui avatar Jan 14 '22 08:01 bilelmoussaoui

Should happen before the release ideally as this will change the API.

sdroege avatar Jan 14 '22 08:01 sdroege

i don't believe that will happen. At worst it can be pushed to a 0.5 release later on

bilelmoussaoui avatar Jan 14 '22 08:01 bilelmoussaoui

I can take a look after I finished my tea. It's just 5 or so functions we're talking about here.

sdroege avatar Jan 14 '22 09:01 sdroege

The commit is simply wrong. None of the functions that are returning an Option now can return NULL. I'll send a PR.

sdroege avatar Jan 14 '22 09:01 sdroege

See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4378

They can actually return NULL and we'll have to handle all this a bit differently here by treating NULL not as None but as an identity transform.

sdroege avatar Jan 14 '22 09:01 sdroege