Skip to content

[th/libnm-direct-strv-property-1] libnm: add direct strv type for NMSetting and use it for "match.interface-name"

Thomas Haller requested to merge th/libnm-direct-strv-property-1 into main

G_TYPE_STRV is the last property type in NMSetting that is implemented by directly accessing the GObect property. Note that we have lots of override, non-default implementations that still use GObject properties, but I am talking here about properties that don't have a special implementation and use a G_TYPE_STRV GObject property.

Add a "direct" implementation also for strv arrays.

The advantage is that we no longer call g_value_get() for various operations, which requires a deep-copy of the strv array. The other advantage is that we will get a unified approach for implementing strv properties. In particular strv arrays need a lot of code to implement, and most settings do it differently. By adding a general mechanism, this code (and behavior) can be unified.


This only does it for 4 properties. The reason is that several STRV properties are implemented vastly different, so reworking them is more effort (and for later). But this adds the general mechanism to have a "direct" strv property.

Merge request reports