mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 10:50:14 +01:00
shared: add NM_UTILS_NAMED_VALUE_INIT() macro
This commit is contained in:
parent
0f22f77b1c
commit
bb19f6e29c
2 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,9 @@
|
|||
#include "nm-errno.h"
|
||||
#include "nm-str-buf.h"
|
||||
|
||||
G_STATIC_ASSERT (sizeof (NMUtilsNamedEntry) == sizeof (const char *));
|
||||
G_STATIC_ASSERT (G_STRUCT_OFFSET (NMUtilsNamedValue, value_ptr) == sizeof (const char *));
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const void *const _NM_PTRARRAY_EMPTY[1] = { NULL };
|
||||
|
|
|
|||
|
|
@ -1407,6 +1407,8 @@ typedef struct {
|
|||
};
|
||||
} NMUtilsNamedValue;
|
||||
|
||||
#define NM_UTILS_NAMED_VALUE_INIT(n, v) { .name = (n), .value_ptr = (v) }
|
||||
|
||||
NMUtilsNamedValue *nm_utils_named_values_from_str_dict_with_sort (GHashTable *hash,
|
||||
guint *out_len,
|
||||
GCompareDataFunc compare_func,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue