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

codegen: Fix nullable array in function params #1551

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

Conversation

bilelmoussaoui
Copy link
Member

Co-authored-by: Andy Russell [email protected]
Fixes #1133

Take over of #1136 except it only generates Option if it is not a return type. To avoid generating Option<Vec<T>>

@bilelmoussaoui
Copy link
Member Author

bilelmoussaoui commented Feb 27, 2024

Ok seems like gir doesn't give us a way to know if the array is zero-terminated or not...that makes it more difficult

@sdroege
Copy link
Member

sdroege commented Feb 28, 2024

To avoid generating Option<Vec>

Why? That seems like the correct thing to do, even if it's inconvenient.

Ok seems like gir doesn't give us a way to know if the array is zero-terminated or not...that makes it more difficult

It's an attribute in the XML though.

@bilelmoussaoui
Copy link
Member Author

It's an attribute in the XML though.

I know, but it is not parsed nor passed around...

@sdroege
Copy link
Member

sdroege commented Feb 28, 2024

I know, but it is not parsed nor passed around...

Uh... what?! 🤣

We assume always that it's zero-terminated unless there is an array length?

@djmaze
Copy link

djmaze commented Sep 23, 2024

Any chance of getting forward on this? This prevents certain features from being used at all.

(For example: user scripts & stylesheets in the webkit6 crate. I needed to make local changes to the generated code in order to use those.)

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
3 participants