mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 08:20:11 +01:00
glib-aux: add nm_strvarray_get_idx() helper
This commit is contained in:
parent
a266bc15b2
commit
b0acbe504f
1 changed files with 9 additions and 0 deletions
|
|
@ -2747,6 +2747,15 @@ nm_strvarray_add(GArray *array, const char *str)
|
|||
g_array_append_val(array, s);
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
nm_strvarray_get_idx(GArray *array, guint idx)
|
||||
{
|
||||
nm_assert(array);
|
||||
nm_assert(idx < array->len);
|
||||
|
||||
return g_array_index(array, const char *, idx);
|
||||
}
|
||||
|
||||
static inline const char *const *
|
||||
nm_strvarray_get_strv_non_empty(GArray *arr, guint *length)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue