X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fobjects.h;h=f030424f283d6ead079eb999a2af4726746308df;hb=3695540ce102f230aafd344f3716420d497112cf;hp=325afe83dfe7fca6e4396000b779863d63525214;hpb=e196f486b4e9b92b9e4307ff2cce6f68e6d2fa88;p=babeltrace.git diff --git a/include/babeltrace/objects.h b/include/babeltrace/objects.h index 325afe83..f030424f 100644 --- a/include/babeltrace/objects.h +++ b/include/babeltrace/objects.h @@ -651,6 +651,23 @@ extern int bt_object_array_append_array(struct bt_object *array_obj); */ extern int bt_object_array_append_map(struct bt_object *array_obj); +/** + * Replaces the element object at index \p index of the array object + * \p array_obj by \p element_obj. + * + * The replaced object's reference count is decremented, unless it's + * a null object. The reference count of \p element_obj is incremented, + * unless it's a null object. + * + * @param array_obj Array object + * @param index Index of element object to replace + * @param element_obj New element object at position \p index of + * \p array_obj + * @returns 0 on success, or a negative value on error + */ +extern int bt_object_array_set(struct bt_object *array_obj, size_t index, + struct bt_object *element_obj); + /** * Gets the size of a map object, that is, the number of elements * contained in a map object.