Add implicit sentinel to strv_env_merge()

Just to make it a tiny bit nicer to use.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-08-11 09:11:42 +02:00
parent d340bdd1bd
commit 4ab3d29ff0
11 changed files with 50 additions and 38 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ char **strv_env_clean_with_callback(char **l, void (*invalid_callback)(const cha
bool strv_env_name_is_valid(char **l);
bool strv_env_name_or_assignment_is_valid(char **l);
char **strv_env_merge(size_t n_lists, ...);
char** _strv_env_merge(char **first, ...);
#define strv_env_merge(first, ...) _strv_env_merge(first, __VA_ARGS__, POINTER_MAX)
char **strv_env_delete(char **x, size_t n_lists, ...); /* New copy */
char **strv_env_unset(char **l, const char *p); /* In place ... */