diff options
author | Thomas Haller <thaller@redhat.com> | 2016-09-05 16:55:07 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-09-08 00:21:21 +0200 |
commit | cdf6ad40572f23be6f8b6971bd57b1002ffb9aaf (patch) | |
tree | d78eb022f0cd9499691b7274022be90fc6f51a37 /src/nm-manager.c | |
parent | 2cae9ba348ed6ea4d41ebd714d8c55f4d49feae9 (diff) | |
download | NetworkManager-cdf6ad40572f23be6f8b6971bd57b1002ffb9aaf.tar.gz |
core: use _NM_GET_PRIVATE() macros
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r-- | src/nm-manager.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 5794bb9ab9..9ad6517dfc 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -158,21 +158,10 @@ typedef struct { NMExportedObjectClass parent; } NMManagerClass; -#define NM_MANAGER_GET_PRIVATE(self) \ - ({ \ - /* preserve the const-ness of self. Unfortunately, that - * way, @self cannot be a void pointer */ \ - typeof (self) _self = (self); \ - \ - /* Get compiler error if variable is of wrong type */ \ - _nm_unused const NMManager *_self2 = (_self); \ - \ - nm_assert (NM_IS_MANAGER (_self)); \ - &_self->_priv; \ - }) - G_DEFINE_TYPE (NMManager, nm_manager, NM_TYPE_EXPORTED_OBJECT) +#define NM_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMManager, NM_IS_MANAGER) + enum { DEVICE_ADDED, INTERNAL_DEVICE_ADDED, |