platform: implement NM_LINUX_PLATFORM_GET_PRIVATE() via _NM_GET_PRIVATE_VOID() macro
We should implement all our private-getters with the very same pattern (i.e. their type structure contains a field "_priv" and nm_assert() with a GObject type check). NM_LINUX_PLATFORM_GET_PRIVATE() was already doing all of that. Now just use the _NM_GET_PRIVATE_VOID() macro which formally follows the intended pattern.
This commit is contained in:
@@ -2581,13 +2581,7 @@ struct _NMLinuxPlatformClass {
|
||||
|
||||
G_DEFINE_TYPE (NMLinuxPlatform, nm_linux_platform, NM_TYPE_PLATFORM)
|
||||
|
||||
static inline NMLinuxPlatformPrivate *
|
||||
NM_LINUX_PLATFORM_GET_PRIVATE (const void *self)
|
||||
{
|
||||
nm_assert (NM_IS_LINUX_PLATFORM (self));
|
||||
|
||||
return &(((NMLinuxPlatform *) self)->_priv);
|
||||
}
|
||||
#define NM_LINUX_PLATFORM_GET_PRIVATE(self) _NM_GET_PRIVATE_VOID(self, NMLinuxPlatform, NM_IS_LINUX_PLATFORM)
|
||||
|
||||
NMPlatform *
|
||||
nm_linux_platform_new (gboolean netns_support)
|
||||
|
Reference in New Issue
Block a user