glib-aux: add NM_STRV_EMPTY() helper
NM_PTRARRAY_EMPTY(char*) gives a "char *const*" pointer, which is often not useful where a strv array is needed. Add a helper macro.
This commit is contained in:
@@ -522,6 +522,7 @@ gboolean nm_utils_memeqzero(gconstpointer data, gsize length);
|
||||
extern const void *const _NM_PTRARRAY_EMPTY[1];
|
||||
|
||||
#define NM_PTRARRAY_EMPTY(type) ((type const *) _NM_PTRARRAY_EMPTY)
|
||||
#define NM_STRV_EMPTY() ((char **) _NM_PTRARRAY_EMPTY)
|
||||
|
||||
static inline void
|
||||
_nm_utils_strbuf_init(char *buf, gsize len, char **p_buf_ptr, gsize *p_buf_len)
|
||||
|
Reference in New Issue
Block a user