From 76f0f9a281bb0b01ad3cbbc96d998af58b7dace3 Mon Sep 17 00:00:00 2001 From: comex Date: Fri, 7 Aug 2015 17:17:01 -0400 Subject: add VEC_STORAGE_INIT_STATIC to match the HTAB one --- lib/cbit/vec.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/cbit') diff --git a/lib/cbit/vec.h b/lib/cbit/vec.h index cbefc0c..c291b41 100644 --- a/lib/cbit/vec.h +++ b/lib/cbit/vec.h @@ -120,6 +120,11 @@ void vec_realloc_internal_as_necessary(struct vec_internal *vi, v->els = v->storage; \ } while (0) +#define VEC_STORAGE_INIT_STATIC(vs, name) \ + {{0, \ + (sizeof((vs)->rest) / sizeof((vs)->rest[0])) + 1, \ + (vs)->v.storage \ + }} /* guaranteed to *not* cache vec->length - pretty simple */ -- cgit v1.2.3