From f25acf244d07985c8ea47252955fbec263ac176d Mon Sep 17 00:00:00 2001 From: Robear Selwans Date: Thu, 30 Dec 2021 18:34:28 +0200 Subject: [PATCH] Added EV_HEAD and EV_TAIL Signed-off-by: Robear Selwans --- ev_macros.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ev_macros.h b/ev_macros.h index 8abb1b6..f846f72 100644 --- a/ev_macros.h +++ b/ev_macros.h @@ -67,6 +67,16 @@ #define EV_STRINGIZE(...) EV_STRINGIZE_IMPL(__VA_ARGS__) #define EV_STRINGIZE_IMPL(...) #__VA_ARGS__ +/*! + * \brief Returns head of list (a,b,c) -> a + */ +#define EV_HEAD(h,...) h + +/*! + * \brief Returns tail of list (a,b,c) -> b,c + */ +#define EV_TAIL(h,...) __VA_ARGS__ + // Used for the removal of parenthesis around tokens #define EV_EXPAND(...) __VA_ARGS__