GNOME Bugzilla – Bug 769206
docs: Clarify when NULL might be returned
Last modified: 2017-03-18 19:10:06 UTC
I think intuitively you might think an empty list would be returned by json_object_get_members() when the object doesn't have any members, so the docs should make it clear that NULL will be returned instead.
Created attachment 332180 [details] [review] docs: Clarify when NULL might be returned If a JsonObject has no members, json_object_get_members() and json_object_get_values() will return NULL, so this commit makes that behavior clear in the docs. It also adds the (nullable) annotation in a few places in the same file.
A NULL GList *is* an empty list — the GList API will gladly accept NULL as a valid list.
Attachment 332180 [details] pushed as 43001a9 - docs: Clarify when NULL might be returned