From 31d4d3dee770117d3f3f57d9253d8f4a1940e8b5 Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Thu, 30 Aug 2018 09:18:29 -0700 Subject: [PATCH] Document refcount of json_tokener_parse_ex return --- json_tokener.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/json_tokener.h b/json_tokener.h index ed272b6..8bcc6b6 100644 --- a/json_tokener.h +++ b/json_tokener.h @@ -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 -- 2.40.0