mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
shared: add nm_g_array_unref() helper
This commit is contained in:
parent
0cf4250021
commit
f4d472beab
|
@ -1538,6 +1538,13 @@ nm_g_array_len(const GArray *arr)
|
|||
return arr ? arr->len : 0u;
|
||||
}
|
||||
|
||||
static inline void
|
||||
nm_g_array_unref(GArray *arr)
|
||||
{
|
||||
if (arr)
|
||||
g_array_unref(arr);
|
||||
}
|
||||
|
||||
#define nm_g_array_append_new(arr, type) \
|
||||
({ \
|
||||
GArray *const _arr = (arr); \
|
||||
|
|
Loading…
Reference in a new issue