vector: add a macro to forward a vector-ref to another function
This commit is contained in:
@@ -40,7 +40,7 @@ struct mie_vector_ops {
|
|||||||
/* use this macro to forward your reference to a vector (which you got via
|
/* 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
|
* MIE_VECTOR_REF_PARAM in your function prototype), to another function whose
|
||||||
* prototype also uses MIE_VECTOR_REF_PARAM */
|
* 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. */
|
/* use these functions if you're accessing a vector directly. */
|
||||||
#define mie_vector_push_back(vector, ptr, ops) \
|
#define mie_vector_push_back(vector, ptr, ops) \
|
||||||
|
|||||||
Reference in New Issue
Block a user