Add string_contains_word_strv()

I had to move STRV_MAKE to macro.h. There is a circular dependency between
extract-word.h, strv.h, and string-util.h that makes it hard to define the
inline function otherwise.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-09-04 12:59:26 +02:00
parent 81823e6c12
commit 46bf625aca
6 changed files with 52 additions and 9 deletions
-4
View File
@@ -123,10 +123,6 @@ bool strv_overlap(char * const *a, char * const *b) _pure_;
char **strv_sort(char **l);
void strv_print(char * const *l);
#define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL }))
#define STRV_MAKE_EMPTY ((char*[1]) { NULL })
#define strv_from_stdarg_alloca(first) \
({ \
char **_l; \