diff --git a/src/libnm-core-impl/nm-setting-connection.c b/src/libnm-core-impl/nm-setting-connection.c index 2adbe7539..2cc4d34c6 100644 --- a/src/libnm-core-impl/nm-setting-connection.c +++ b/src/libnm-core-impl/nm-setting-connection.c @@ -2582,6 +2582,7 @@ nm_setting_connection_class_init(NMSettingConnectionClass *klass) NM_TYPE_SETTING_CONNECTION_AUTOCONNECT_SLAVES, NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT, NM_SETTING_PARAM_FUZZY_IGNORE, + NULL, NMSettingConnectionPrivate, autoconnect_slaves); @@ -2658,6 +2659,7 @@ nm_setting_connection_class_init(NMSettingConnectionClass *klass) NM_TYPE_METERED, NM_METERED_UNKNOWN, NM_SETTING_PARAM_REAPPLY_IMMEDIATELY, + NULL, NMSettingConnectionPrivate, metered); diff --git a/src/libnm-core-impl/nm-setting-ip6-config.c b/src/libnm-core-impl/nm-setting-ip6-config.c index 4ad099320..cd9c20ad7 100644 --- a/src/libnm-core-impl/nm-setting-ip6-config.c +++ b/src/libnm-core-impl/nm-setting-ip6-config.c @@ -936,6 +936,7 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) NM_TYPE_SETTING_IP6_CONFIG_PRIVACY, NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, NM_SETTING_PARAM_NONE, + NULL, NMSettingIP6ConfigPrivate, ip6_privacy); diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h index 9fe49de48..38992d6d6 100644 --- a/src/libnm-core-impl/nm-setting-private.h +++ b/src/libnm-core-impl/nm-setting-private.h @@ -894,44 +894,45 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p /*****************************************************************************/ -#define _nm_setting_property_define_direct_enum(properties_override, \ - obj_properties, \ - prop_name, \ - prop_id, \ - gtype_enum, \ - default_value, \ - param_flags, \ - private_struct_type, \ - private_struct_field, \ - ... /* extra NMSettInfoProperty fields */) \ - G_STMT_START \ - { \ - GParamSpec *_param_spec; \ - \ - G_STATIC_ASSERT( \ - !NM_FLAGS_ANY((param_flags), \ - ~(NM_SETTING_PARAM_REAPPLY_IMMEDIATELY | NM_SETTING_PARAM_FUZZY_IGNORE \ - | NM_SETTING_PARAM_INFERRABLE))); \ - \ - _param_spec = g_param_spec_enum("" prop_name "", \ - "", \ - "", \ - (gtype_enum), \ - (default_value), \ - G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY \ - | G_PARAM_STATIC_STRINGS | (param_flags)); \ - \ - (obj_properties)[(prop_id)] = _param_spec; \ - \ - _nm_properties_override_gobj( \ - (properties_override), \ - _param_spec, \ - &nm_sett_info_propert_type_direct_enum, \ - .direct_offset = \ - NM_STRUCT_OFFSET_ENSURE_TYPE(int, private_struct_type, private_struct_field), \ - __VA_ARGS__); \ - } \ - G_STMT_END +#define _nm_setting_property_define_direct_enum(properties_override, \ + obj_properties, \ + prop_name, \ + prop_id, \ + gtype_enum, \ + default_value, \ + param_flags, \ + property_type, \ + private_struct_type, \ + private_struct_field, \ + ... /* extra NMSettInfoProperty fields */) \ + ({ \ + GParamSpec *_param_spec; \ + const NMSettInfoPropertType *_property_type; \ + \ + G_STATIC_ASSERT( \ + !NM_FLAGS_ANY((param_flags), \ + ~(NM_SETTING_PARAM_REAPPLY_IMMEDIATELY | NM_SETTING_PARAM_FUZZY_IGNORE \ + | NM_SETTING_PARAM_INFERRABLE))); \ + \ + _param_spec = g_param_spec_enum("" prop_name "", \ + "", \ + "", \ + (gtype_enum), \ + (default_value), \ + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY \ + | G_PARAM_STATIC_STRINGS | (param_flags)); \ + \ + (obj_properties)[(prop_id)] = _param_spec; \ + _property_type = (property_type) ?: &nm_sett_info_propert_type_direct_enum; \ + \ + _nm_properties_override_gobj( \ + (properties_override), \ + _param_spec, \ + _property_type, \ + .direct_offset = \ + NM_STRUCT_OFFSET_ENSURE_TYPE(int, private_struct_type, private_struct_field), \ + __VA_ARGS__); \ + }) /*****************************************************************************/ @@ -950,6 +951,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p NM_TYPE_TERNARY, \ NM_TERNARY_DEFAULT, \ (param_flags), \ + NULL, \ private_struct_type, \ private_struct_field, \ __VA_ARGS__)