summaryrefslogtreecommitdiff
path: root/json_object.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2016-04-30 18:52:47 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2016-04-30 18:52:47 +0000
commit1fb87cd196d473299b49a97329e47ea6a7ed5c67 (patch)
treed9a68f01b532c415c05f81d3a47cec7c3d680a24 /json_object.h
parente3fb74942a761280c70b189a189ade45d9fa5ef5 (diff)
parentcdca9d3c8e50ff7de712f7157d6f0ddaa1922700 (diff)
downloadjson-c-1fb87cd196d473299b49a97329e47ea6a7ed5c67.tar.gz
Merge branch 'master' of https://github.com/Protovision/json-c into Protovision-master
Diffstat (limited to 'json_object.h')
-rw-r--r--json_object.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/json_object.h b/json_object.h
index f4d9e79..2d1ba94 100644
--- a/json_object.h
+++ b/json_object.h
@@ -526,6 +526,19 @@ extern int json_object_array_put_idx(struct json_object *obj, int idx,
extern struct json_object* json_object_array_get_idx(const struct json_object *obj,
int idx);
+/** Delete an elements from a specified index in an array (a json_object of type json_type_array)
+ *
+ * The reference count will be decremented for each of the deleted objects. If there
+ * are no more owners of an element that is being deleted, then the value is
+ * freed. Otherwise, the reference to the value will remain in memory.
+ *
+ * @param obj the json_object instance
+ * @param idx the index to start deleting elements at
+ * @param count the number of elements to delete
+ * @returns 0 if the elements were successfully deleted
+ */
+extern int json_object_array_del_idx(struct json_object *obj, int idx, int count);
+
/* json_bool type methods */
/** Create a new empty json_object of type json_type_boolean