platform: move nmp_object_equal() to header for inline

This commit is contained in:
Thomas Haller
2017-11-20 12:55:14 +01:00
parent 48960ba8da
commit f7d83e681f
2 changed files with 7 additions and 7 deletions

View File

@@ -861,12 +861,6 @@ _vt_cmd_obj_cmp_lnk_vlan (const NMPObject *obj1, const NMPObject *obj2)
return c;
}
gboolean
nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2)
{
return nmp_object_cmp (obj1, obj2) == 0;
}
/* @src is a const object, which is not entirely correct for link types, where
* we increase the ref count for src->_link.udev.device.
* Hence, nmp_object_copy() can violate the const promise of @src.

View File

@@ -471,7 +471,13 @@ const NMPObject *nmp_object_stackinit_id_ip6_address (NMPObject *obj, int ifinde
const char *nmp_object_to_string (const NMPObject *obj, NMPObjectToStringMode to_string_mode, char *buf, gsize buf_size);
void nmp_object_hash_update (const NMPObject *obj, NMHashState *h);
int nmp_object_cmp (const NMPObject *obj1, const NMPObject *obj2);
gboolean nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2);
static inline gboolean
nmp_object_equal (const NMPObject *obj1, const NMPObject *obj2)
{
return nmp_object_cmp (obj1, obj2) == 0;
}
void nmp_object_copy (NMPObject *dst, const NMPObject *src, gboolean id_only);
NMPObject *nmp_object_clone (const NMPObject *obj, gboolean id_only);