diff options
| author | Michael Biebl <biebl@debian.org> | 2024-01-25 09:46:18 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-01-25 09:46:18 +0100 |
| commit | 70e18d99b8e3e77bb37e218d7ac582130156f8ef (patch) | |
| tree | d40c587e6d3f0e094ff558e415f1bb9803643214 /src/libnm-core-impl/nm-setting-vpn.c | |
| parent | d4d8b2b91f7ba000d97a8b2aab48c85000c11314 (diff) | |
New upstream version 1.45.90 upstream/1.45.90
Diffstat (limited to 'src/libnm-core-impl/nm-setting-vpn.c')
| -rw-r--r-- | src/libnm-core-impl/nm-setting-vpn.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/libnm-core-impl/nm-setting-vpn.c b/src/libnm-core-impl/nm-setting-vpn.c index 5984f773..b867d018 100644 --- a/src/libnm-core-impl/nm-setting-vpn.c +++ b/src/libnm-core-impl/nm-setting-vpn.c @@ -80,20 +80,17 @@ typedef struct { * VPN Settings */ struct _NMSettingVpn { - NMSetting parent; - /* In the past, this struct was public API. Preserve ABI! */ + NMSetting parent; + NMSettingVpnPrivate _priv; }; struct _NMSettingVpnClass { NMSettingClass parent; - /* In the past, this struct was public API. Preserve ABI! */ - gpointer padding[4]; }; G_DEFINE_TYPE(NMSettingVpn, nm_setting_vpn, NM_TYPE_SETTING) -#define NM_SETTING_VPN_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_VPN, NMSettingVpnPrivate)) +#define NM_SETTING_VPN_GET_PRIVATE(o) _NM_GET_PRIVATE(o, NMSettingVpn, NM_IS_SETTING_VPN, NMSetting) /*****************************************************************************/ @@ -1067,8 +1064,6 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) NMSettingClass *setting_class = NM_SETTING_CLASS(klass); GArray *properties_override = _nm_sett_info_property_override_create_array(); - g_type_class_add_private(klass, sizeof(NMSettingVpnPrivate)); - object_class->get_property = get_property; object_class->set_property = set_property; object_class->finalize = finalize; @@ -1095,7 +1090,8 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) PROP_SERVICE_TYPE, NM_SETTING_PARAM_NONE, NMSettingVpnPrivate, - service_type); + service_type, + .direct_string_allow_empty = TRUE); /** * NMSettingVpn:user-name: @@ -1113,7 +1109,8 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) PROP_USER_NAME, NM_SETTING_PARAM_NONE, NMSettingVpnPrivate, - user_name); + user_name, + .direct_string_allow_empty = TRUE); /** * NMSettingVpn:persistent: @@ -1211,5 +1208,5 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) NM_META_SETTING_TYPE_VPN, NULL, properties_override, - NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS); + G_STRUCT_OFFSET(NMSettingVpn, _priv)); } |