mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 06:40:18 +01:00
libnm-core: add direct_strv_not_null property
This property indicates that a non-null strv array is expected, and an empty strv array should be returned instead of NULL if it hadn't been created yet.
This commit is contained in:
parent
66887fafef
commit
63c4827af2
2 changed files with 5 additions and 1 deletions
|
|
@ -859,7 +859,7 @@ _nm_setting_property_get_property_direct(GObject *object,
|
|||
value,
|
||||
nm_strvarray_get_strv_full_dup(p_val->arr,
|
||||
NULL,
|
||||
FALSE,
|
||||
property_info->direct_strv_not_null,
|
||||
property_info->direct_strv_preserve_empty));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -868,6 +868,10 @@ struct _NMSettInfoProperty {
|
|||
* an empty array. */
|
||||
bool direct_strv_preserve_empty : 1;
|
||||
|
||||
/* This flag indicates that an empty strv array should be returned
|
||||
* instead of NULL if it hadn't been created yet. */
|
||||
bool direct_strv_not_null : 1;
|
||||
|
||||
/* Usually, properties that are set to the default value for the GParamSpec
|
||||
* are not serialized to GVariant (and NULL is returned by to_dbus_data().
|
||||
* Set this flag to force always converting the property even if the value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue