mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 00:55:56 +00:00
shared: add nm_g_hash_table_ref()/nm_g_hash_table_unref() helpers
This commit is contained in:
parent
395665902b
commit
eaa48caac4
|
@ -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…
Reference in a new issue