]> git.puffer.fish Git - mirror/frr.git/commit
lib: darr: add free with element cleanup functions
authorChristian Hopps <chopps@labn.net>
Tue, 4 Jun 2024 09:43:49 +0000 (05:43 -0400)
committerChristian Hopps <chopps@labn.net>
Fri, 7 Jun 2024 02:38:48 +0000 (22:38 -0400)
commite14781eb1d9be38ad89c58dcb20afc64062eab2a
tree2b8fe91ec25e397d3623bac8f8e83509a324c302
parenta24c8050e182efcb1d065e570313684e7ffc24b0
lib: darr: add free with element cleanup functions

- `darr_free_free` to `darr_free` each element prior to `darr_free`
  the array.
- `darr_free_func` to call `func` on each element prior to `darr_free`
  the array.

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/darr.h
tests/lib/test_darr.c