From 000a9c26713bd2e94e90a58fb9868ae75635ccca Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 16 Mar 2026 11:57:48 +0000 Subject: [PATCH] vector: add a macro to forward a vector-ref to another function --- mie/include/mie/vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mie/include/mie/vector.h b/mie/include/mie/vector.h index 9d70be6..d09e1a4 100644 --- a/mie/include/mie/vector.h +++ b/mie/include/mie/vector.h @@ -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) \