From: Ralph Ronnquist Date: Sat, 9 Jul 2022 09:29:11 +0000 (+1000) Subject: added convenience callbacks X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=65c1d7e61e1f70fc92214836487dd58f137e2758;p=rrq%2Frrqmisc.git added convenience callbacks --- diff --git a/vector/vector.c b/vector/vector.c index 16d5577..c450a60 100644 --- a/vector/vector.c +++ b/vector/vector.c @@ -504,11 +504,15 @@ inline void *vector_get(vector *pv,vector_index index) { return *p; } -int vector_reclaim_any(vector *pv,vector_index ix,void *item,void *data) { +int vector_free_any(vector *pv,vector_index ix,void *item,void *data) { free( item ); return 0; } +int vector_clear_any(vector *pv,vector_index ix,void *item,void *data) { + return 0; +} + void vector_append(vector *pv,void *value) { vector_resize( pv, pv->size + 1, 0, 0 ); vector_set( pv, pv->size - 1, value );