Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Don't skip Option for nullable collections #1622

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fengalin
Copy link
Contributor

@fengalin fengalin commented Dec 7, 2024

Nullable collection were represented as a Vec<_> or [_], but an empty collection is not the same as an undefined collection.

Fixes: #1133
See also: gtk-rs/gtk-rs-core#1257

TODO

  • Add support for glib::value Option<Vec<_>> conversions.

Nullable collection were represented as a `Vec<_>` or `[_]`, but an empty
collection is not the same as an undefined collection.

Fixes: gtk-rs#1133
See also: gtk-rs/gtk-rs-core#1257
@sdroege
Copy link
Member

sdroege commented Dec 8, 2024

[ ] Add support for glib::value Option<Vec<_>> conversions.

I think this also involves untangling our existing implementations a bit as they currently map NULL to empty arrays, and possibly also the other way around?

Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks too easy, I didn't expect that :)

@sdroege
Copy link
Member

sdroege commented Dec 8, 2024

There's also #1551 doing more or less the same (but a bit more?). I think the main problem here now is fixing glib/translate.rs

@sdroege
Copy link
Member

sdroege commented Dec 30, 2024

@fengalin What's the plan to continue here, especially with the translation traits?

@fengalin
Copy link
Contributor Author

fengalin commented Dec 30, 2024

My plan was to start over from the PR you linked and implement the changes in the glib bindings. But I got involved with other stuffs. I'll try to resume this later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data parameter for gio::content_type_guess should be an Option
2 participants