shared: add nm_g_hash_table_ref()/nm_g_hash_table_unref() helpers

This commit is contained in:
Thomas Haller 2020-11-11 18:16:24 +01:00
parent 395665902b
commit eaa48caac4
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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)
{