]> granicus.if.org Git - json-c/commitdiff
Document refcount of json_tokener_parse_ex return
authorChristopher Head <chead@chead.ca>
Thu, 30 Aug 2018 16:18:29 +0000 (09:18 -0700)
committerChristopher Head <chead@chead.ca>
Thu, 30 Aug 2018 16:18:29 +0000 (09:18 -0700)
json_tokener.h

index ed272b673dfd8c0215b7f34da509d860a60d7e0f..8bcc6b6f6216958f2ed1a3f0289e264d93ec35b2 100644 (file)
@@ -155,9 +155,10 @@ JSON_EXPORT void json_tokener_set_flags(struct json_tokener *tok, int flags);
  * called.
  *
  * When a valid JSON value is parsed, a non-NULL json_object will be
- * returned.  Also, json_tokener_get_error() will return json_tokener_success.
- * Be sure to check the type with json_object_is_type() or
- * json_object_get_type() before using the object.
+ * returned, with a reference count of one which belongs to the caller.  Also,
+ * json_tokener_get_error() will return json_tokener_success. Be sure to check
+ * the type with json_object_is_type() or json_object_get_type() before using
+ * the object.
  *
  * @b XXX this shouldn't use internal fields:
  * Trailing characters after the parsed value do not automatically cause an