-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
gio: manually implement content_type_guess #1591
base: main
Are you sure you want to change the base?
gio: manually implement content_type_guess #1591
Conversation
8ecd700
to
7a18f52
Compare
Not sure if it wouldn't be better to implement the other function manually and have it take an @bilelmoussaoui do you have a preference? |
If you make it |
The actual solution is to fix gir so that all the broken functions are generated properly. Adding a function deviates further from such fix, at worst implement it manually to fix the behaviour despite the API break and you can call into ffi manually on your app/lib side until we do a breaking api release |
We also decided that we don't consider nullability fixes as unacceptable breaking changes
So let's manually implement this function for the time being until someone has the time and motivation to fix gir :) |
7a18f52
to
5830056
Compare
I've updated this PR to replace the generated This can be a stopgap until gir generation for these types is fixed. |
As work on this is underway in the code generator (gtk-rs/gir#1622), let's see if we can get that merged relatively soonish. |
Related: #1257
In C,
g_content_type_guess
supports passing NULL to thedata
parameter which makes it guess the content type based on the filename only.So, add a manually written
content_type_guess
allowingOption
for thedata
parameter. This is a stopgap untilgir
can generate the optional parameter for these cases.This is an API break in some cases, but should continue to compile in most cases.