mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 21:10:25 +01:00
shared: add nm_g_hash_table_ref()/nm_g_hash_table_unref() helpers
This commit is contained in:
parent
395665902b
commit
eaa48caac4
1 changed files with 13 additions and 0 deletions
|
|
@ -1662,6 +1662,19 @@ GPtrArray *_nm_g_ptr_array_copy(GPtrArray * array,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline GHashTable *
|
||||
nm_g_hash_table_ref(GHashTable *hash)
|
||||
{
|
||||
return hash ? g_hash_table_ref(hash) : NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
nm_g_hash_table_unref(GHashTable *hash)
|
||||
{
|
||||
if (hash)
|
||||
g_hash_table_unref(hash);
|
||||
}
|
||||
|
||||
static inline guint
|
||||
nm_g_hash_table_size(GHashTable *hash)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue