vector: add a macro to forward a vector-ref to another function

This commit is contained in:
2026-03-16 11:57:48 +00:00
parent 8a50445dd8
commit 000a9c2671

View File

@@ -40,7 +40,7 @@ struct mie_vector_ops {
/* use this macro to forward your reference to a vector (which you got via
* MIE_VECTOR_REF_PARAM in your function prototype), to another function whose
* prototype also uses MIE_VECTOR_REF_PARAM */
#define MIE_VECTOR_REF2(name) &(name.items), &(name.count), &(name.max)
#define MIE_VECTOR_REF2(name) name, name##_count, name##_max
/* use these functions if you're accessing a vector directly. */
#define mie_vector_push_back(vector, ptr, ops) \