X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fstrv.h;h=0a908c89345db05ffc25fe1d89c7a6251fa2094f;hb=26f0d9bd01bb3047c31e8e9586f47440cbce50bd;hp=c4a8a1d20c8cd7fae03c6d4316e2c6e2ef3e3daf;hpb=706da8f4c21d582eb3334aa01ecd75a9db5c481c;p=elogind.git diff --git a/src/basic/strv.h b/src/basic/strv.h index c4a8a1d20..0a908c893 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -160,6 +160,11 @@ void strv_print(char **l); }) #define STR_IN_SET(x, ...) strv_contains(STRV_MAKE(__VA_ARGS__), x) +#define STRPTR_IN_SET(x, ...) \ + ({ \ + const char* _x = (x); \ + _x && strv_contains(STRV_MAKE(__VA_ARGS__), _x); \ + }) #define FOREACH_STRING(x, ...) \ for (char **_l = ({ \