[libvirt PATCH] meson: Use dicts to initialize cfg_data objects

Martin Kletzander mkletzan at redhat.com
Thu Mar 31 13:36:50 UTC 2022


On Wed, Mar 30, 2022 at 01:26:35PM +0200, Andrea Bolognani wrote:
>Instead of creating an empty object and then setting keys one
>at a time, it is possible to pass a dict object to
>configuration_data(). This is nicer because it doesn't require
>repeating the name of the cfg_data object over and over.
>
>There is one exception: the 'conf' object, where we store values
>that are used directly by C code. In that case, using a dict
>object is not feasible for two reasons: first of all, replacing
>the set_quoted() calls would result in awkward code with a lot
>of calls to format(); moreover, since code that modifies it is
>sprinkled all over the place, refactoring it would probably
>make things more complicated rather than simpler.
>
>Signed-off-by: Andrea Bolognani <abologna at redhat.com>

For after release

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>

even though it *adds* lines ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220331/a8d805cb/attachment.sig>


More information about the libvir-list mailing list