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-gsm.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-gsm.c')
-rw-r--r-- | libnm-core/nm-setting-gsm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c index 3011d91783..b1ab193aa1 100644 --- a/libnm-core/nm-setting-gsm.c +++ b/libnm-core/nm-setting-gsm.c @@ -40,7 +40,6 @@ G_DEFINE_TYPE_WITH_CODE (NMSettingGsm, nm_setting_gsm, NM_TYPE_SETTING, _nm_register_setting (GSM, NM_SETTING_PRIORITY_HW_BASE)) -NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_GSM) #define NM_SETTING_GSM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_GSM, NMSettingGsmPrivate)) |