[Webkit-unassigned] [Bug 167495] [GTK] Confusing webkit_uri_scheme_request_finish_error() description

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 30 00:16:59 PST 2017


--- Comment #2 from Milan Crha <mcrha at redhat.com> ---
I do not know how "normal" it is, I only try to keep APIs clean as much as possible, even in C, where the 'const' doesn't propagate to structure members. The hint with 'const' is like to mark a function 'const' in C++. Of course, there are some "issues" sometimes, when the corresponding API doesn't do the same, thus you can end with a silly typecast from const to non-const on an object where its get-function doesn't declare the object as const (and example can be a GSList/GList), though this is hidden to the caller.

I'm fine if you do not want to change it to the 'const', just make it explicit in the documentation that the 'error' is not taken by the function.

I consider confusing also [1], but maybe it's more about no explicit mention that the 'model' is referenced by the GtkTreeView. I understand that it's obvious when one knows about "default transfer method", but I confess I didn't know that.

The closest to this webkit function might be [2], and even it's all deprecated, see the [3], which takes ownership of the 'error', but it's not properly annotated. GTask has this done properly, at least where I looked.

[1] https://developer.gnome.org/gtk3/stable/GtkTreeView.html#gtk-tree-view-set-model
[2] https://developer.gnome.org/gio/stable/GSimpleAsyncResult.html#g-simple-async-result-set-from-error
[3] https://developer.gnome.org/gio/stable/GSimpleAsyncResult.html#g-simple-async-result-take-error

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170130/435ed8af/attachment-0001.html>

More information about the webkit-unassigned mailing list