darray: Add darray_insert() to insert a value at a specified index
authorDamien Grassart <damien@grassart.com>
Tue, 29 Aug 2017 10:08:40 +0000 (12:08 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 29 Aug 2017 11:05:07 +0000 (21:05 +1000)
commitf3f93e28cab1183cd8a23d0b7ef97dbdbde681a2
treed3d273613279e6a6a64a4b043d36594f8f736ecb
parente6abb93d50ba9f1e90163d7db53be70b8ef81a96
darray: Add darray_insert() to insert a value at a specified index

This module currently supports removing but not inserting at a
specified index, so this adds that along with some tests. Inserting a
value moves all existing data beyond index over one element.

Signed-off-by: Damien Grassart <damien@grassart.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/darray/darray.h
ccan/darray/test/run.c