summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2020-06-29 02:31:32 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2020-06-29 02:31:32 +0000
commit0b67caec1a72c1e89d8a34f9094ad40ac6d9faf9 (patch)
tree39d93b64bb6225a4f3a992ebef94408ada1a4cae
parenta4e3700972fe1582189d7b5594b54b940894bdff (diff)
downloadjson-c-0b67caec1a72c1e89d8a34f9094ad40ac6d9faf9.tar.gz
Add doc comment for json_object_new_array_ext().
-rw-r--r--json_object.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/json_object.h b/json_object.h
index 5f2f64c..d331818 100644
--- a/json_object.h
+++ b/json_object.h
@@ -500,6 +500,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
/* Array type methods */
/** Create a new empty json_object of type json_type_array
+ * with 32 slots allocated.
* If you know the array size you'll need ahead of time, use
* json_object_new_array_ext() instead.
* @see json_object_new_array_ext()
@@ -508,6 +509,12 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
*/
JSON_EXPORT struct json_object *json_object_new_array(void);
+/** Create a new empty json_object of type json_type_array
+ * with the desired number of slots allocated.
+ * @see json_object_array_shrink()
+ * @param initial_size the number of slots to allocate
+ * @returns a json_object of type json_type_array
+ */
JSON_EXPORT struct json_object *json_object_new_array_ext(int initial_size);
/** Get the arraylist of a json_object of type json_type_array