diff options
author | Thomas Haller <thaller@redhat.com> | 2018-06-24 17:41:02 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-07-01 18:17:31 +0200 |
commit | fa9fe466dbf74dd07acfd83ba440a0f48c41d401 (patch) | |
tree | 794de899b28bb44739fab592bdb5bc2e4f87cc04 /libnm-core/nm-setting-wired.c | |
parent | ecd53944b37913ea6a4eebbd71bd3cbf77debc2f (diff) | |
download | NetworkManager-fa9fe466dbf74dd07acfd83ba440a0f48c41d401.tar.gz |
libnm: avoid constructor function for registering NMSetting types
constructor functions are ugly, because code is running before
main() starts. Instead, as the registration code for NMSetting types
is insid the GType constructor, we just need to ensure at the
right place, that the GType was created.
The right place here is _register_settings_ensure_inited(), because
that is called before we need the registration information.
Diffstat (limited to 'libnm-core/nm-setting-wired.c')
-rw-r--r-- | libnm-core/nm-setting-wired.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index 5608fb103d..104451e2d0 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -42,7 +42,6 @@ G_DEFINE_TYPE_WITH_CODE (NMSettingWired, nm_setting_wired, NM_TYPE_SETTING, _nm_register_setting (WIRED, NM_SETTING_PRIORITY_HW_BASE)) -NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_WIRED) #define NM_SETTING_WIRED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_WIRED, NMSettingWiredPrivate)) |