GNOME Bugzilla – Bug 779464
json-node: Clarify documentation on JsonNode getters for other types
Last modified: 2017-03-02 12:12:13 UTC
Trivial patch attached.
Created attachment 347042 [details] [review] json-node: Clarify documentation on JsonNode getters for other types Clarify in the documentation what each of the JsonNode getters when called on a node which contains a value whose type is not what the caller expects (since this behaviour is well-defined in the code). Inspired by http://stackoverflow.com/q/42081921/2931197. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 347042 [details] [review]: Looks like a good improvement. Just a minor issue on the annotations… ::: json-glib/json-node.c @@ +557,2 @@ * * Return value: (transfer none): the #JsonObject Shouldn't the annotation be updated to include (nullable) here as well? @@ +576,2 @@ * * Return value: (transfer full): the #JsonObject Same as above. @@ +650,2 @@ * * Return value: (transfer none): the #JsonArray Same as above. @@ +669,2 @@ * * Return value: (transfer full): the #JsonArray with its reference Same as above. @@ +999,2 @@ * * Return value: a string value. Same as above. @@ +1022,2 @@ * * Return value: (transfer full): a newly allocated string containing a copy Same as above.
Good point, pushed with the annotations added. Thanks. Attachment 347042 [details] pushed as 011c1e4 - json-node: Clarify documentation on JsonNode getters for other types