platform: make plobj argument of nmp_object_new() void pointer

NMPlatformObject is a base-type of all actual platform structs.
We very seldomly use this type directly. Most callers that pass
the plobj to nmp_object_new() will need to cast it.

Make the varible a void pointer to not require the cast.
This commit is contained in:
Thomas Haller 2019-07-28 16:06:11 +02:00
parent 0e44c294e7
commit 25fd48948a
2 changed files with 2 additions and 2 deletions

View file

@ -786,7 +786,7 @@ _nmp_object_new_from_class (const NMPClass *klass)
}
NMPObject *
nmp_object_new (NMPObjectType obj_type, const NMPlatformObject *plobj)
nmp_object_new (NMPObjectType obj_type, gconstpointer plobj)
{
const NMPClass *klass = nmp_class_from_type (obj_type);
NMPObject *obj;

View file

@ -673,7 +673,7 @@ nmp_object_unref (const NMPObject *obj)
_changed; \
})
NMPObject *nmp_object_new (NMPObjectType obj_type, const NMPlatformObject *plob);
NMPObject *nmp_object_new (NMPObjectType obj_type, gconstpointer plobj);
NMPObject *nmp_object_new_link (int ifindex);
const NMPObject *nmp_object_stackinit (NMPObject *obj, NMPObjectType obj_type, gconstpointer plobj);