After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728983 - Docs: various fixes and improvements
Docs: various fixes and improvements
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
2.40.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-04-25 21:33 UTC by Sébastien Wilmet
Modified: 2014-05-09 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
doc: various improvements (4.38 KB, patch)
2014-04-25 21:33 UTC, Sébastien Wilmet
reviewed Details | Review
doc: various improvements (4.15 KB, patch)
2014-05-03 19:29 UTC, Sébastien Wilmet
committed Details | Review

Description Sébastien Wilmet 2014-04-25 21:33:17 UTC
A patch will be attached.
Comment 1 Sébastien Wilmet 2014-04-25 21:33:52 UTC
Created attachment 275170 [details] [review]
doc: various improvements

- GSubprocessLauncher exists since 2.40, not 2.36
- more logical order for g_markup functions
- fix short description of GMarkup
- GMarkupParser: specify that some parameters are NULL-terminated.
- g_string_new (NULL); is possible.
- g_string_free (NULL, ...); is not possible.
- other trivial fixes.
Comment 2 Dan Winship 2014-05-01 13:10:42 UTC
Comment on attachment 275170 [details] [review]
doc: various improvements

>  * GMarkupParser:
>  * @start_element: Callback to invoke when the opening tag of an element
>- *     is seen.
>+ *     is seen. @attribute_names and @attribute_values are %NULL-terminated.

I think gtk-doc will complain about that, because "attribute_names" and "attribute_values" aren't elements of GMarkupParser. I think you want `attribute_names` instead. (Possibly, "The callback's `attribute_names` and `attribute_values` parameters are %NULL-terminated.")

>+ * @init: the initial text to copy into the string, or %NULL

@init: (allow-none): the initial text to copy into the string, or %NULL to start with an empty string.

>  * g_string_free:
>- * @string: a #GString
>+ * @string: a non-%NULL #GString

That's implied. Functions have to explicitly document that they allow NULL, not that they *don't* allow NULL.
Comment 3 Sébastien Wilmet 2014-05-03 19:28:50 UTC
Thanks for the review, I'll attach an updated patch.

(In reply to comment #2)
> I think gtk-doc will complain about that, because "attribute_names" and
> "attribute_values" aren't elements of GMarkupParser.

The GTK-Doc manual says:
"Use @param to refer to parameters. Also use this when referring to parameters of other functions, related to the one being described."

> That's implied. Functions have to explicitly document that they allow NULL, not
> that they *don't* allow NULL.

For the "free" functions in GLib it's difficult to remember which functions accept NULL (like g_free()) and which don't. Maybe a better solution is to accept NULL in all "free" functions, so it is uniform.
Comment 4 Sébastien Wilmet 2014-05-03 19:29:19 UTC
Created attachment 275759 [details] [review]
doc: various improvements

- GSubprocessLauncher exists since 2.40, not 2.36
- more logical order for g_markup functions
- fix short description of GMarkup
- GMarkupParser: specify that some parameters are NULL-terminated.
- g_string_new (NULL); is possible.
- other trivial fixes.
Comment 5 Sébastien Wilmet 2014-05-09 16:53:18 UTC
Comment on attachment 275759 [details] [review]
doc: various improvements

I've pushed the commit, it fixes the things pointed above.