GNOME Bugzilla – Bug 728983
Docs: various fixes and improvements
Last modified: 2014-05-09 16:53:45 UTC
A patch will be attached.
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 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.
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.
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 on attachment 275759 [details] [review] doc: various improvements I've pushed the commit, it fixes the things pointed above.