From 25fd48948a23e5f3a9008e1f4211abcc92e1822a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 28 Jul 2019 16:06:11 +0200 Subject: 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. --- src/platform/nmp-object.c | 2 +- src/platform/nmp-object.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 3c914f0c3e..5cbf9428f8 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -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; diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h index fc844aaf86..95173130cd 100644 --- a/src/platform/nmp-object.h +++ b/src/platform/nmp-object.h @@ -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); -- cgit v1.2.1