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

Wrong type of gi-webkit2 networkProxySettingsNew argument #154

Closed
dylex opened this issue Apr 13, 2018 · 3 comments
Closed

Wrong type of gi-webkit2 networkProxySettingsNew argument #154

dylex opened this issue Apr 13, 2018 · 3 comments

Comments

@dylex
Copy link
Contributor

dylex commented Apr 13, 2018

The function from gi-webkit2-4.0.15 built on webkitgtk-2.20.0:

GI.WebKit2.Structs.NetworkProxySettings.networkProxySettingNew :: Maybe Text -> Maybe Text -> m NetworkProxySettings

Should probably have a type like:

GI.WebKit2.Structs.NetworkProxySettings.networkProxySettingNew :: Maybe Text -> Maybe [Text] -> m NetworkProxySettings

The C type for the second argument is char **ignoreHosts and used as:

if (ignoreHosts)
  g_strdupv(ignoreHosts);

suggesting it's an optional, NULL-terminated list. I'm not sure what the annotation is supposed to look like to fix this.

@garetxe
Copy link
Collaborator

garetxe commented Apr 16, 2018

Thanks for the report! The introspection data is indeed wrong. I added an override to gi-webkit2-4.0.17, which I just uploaded to hackage. It required some work on haskell-gi itself, so this version depends on haskell-gi-0.21.1 or higher.

It would be great if you could report to WebKitGtk upstream, so other bindings can benefit too. An (array zero-terminated=1) annotation needs to be added to the ignore_hosts argument.

@dylex
Copy link
Contributor Author

dylex commented Apr 16, 2018

Awesome, thanks for all the quick fixes. Filed https://bugs.webkit.org/show_bug.cgi?id=184658 for this and #155.

@garetxe
Copy link
Collaborator

garetxe commented Apr 17, 2018

Great, thanks! Closing this issue then.

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

No branches or pull requests

2 participants