qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 0/8] qom: Use qlit to represent property defaults


From: Markus Armbruster
Subject: Re: [PATCH v2 0/8] qom: Use qlit to represent property defaults
Date: Thu, 19 Nov 2020 13:39:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Eduardo Habkost <ehabkost@redhat.com> writes:

> Based-on: 20201104160021.2342108-1-ehabkost@redhat.com
> Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-qlit-defaults
>
> This extend qlit.h to support all QNum types (signed int,
> unsigned int, and double), and use QLitObject to represent field
> property defaults.
>
> It allows us to get rid of most type-specific .set_default_value
> functions for QOM property types.

What's left?

I'm asking because if you create a new way to get rid of most of an old
way, you're still left with two ways, which may or may not be an
improvement.

Moving defaults from code to data sounds attractive to me.  Data is
easier to reason about than code.  For QAPI, we've been talking about
defining defaults in the schema for a long time, but nobody has gotten
around to finish an implementation.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]