[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 17/54] qapi: add 'if' condition on entity obj
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 17/54] qapi: add 'if' condition on entity objects |
Date: |
Tue, 05 Sep 2017 18:31:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> Hi
>
> ----- Original Message -----
>> Marc-André Lureau <address@hidden> writes:
>>
>> > Take 'if' from expression, and use it to construct entity objects.
>> > Shared implicit objects must share the same 'if' condition.
>>
>> Shared by what?
>
> Shared by various make_implicit_object_type() users.
The only ones that are shared right now are simple union wrappers. For
those, you pick a condition that isn't tight, but works. Now we need to
work that into the commit message. Perhaps:
qapi: Pass 'if' condition into QAPISchemaEntity objects
Built-in objects remain unconditional. Explicitly defined objects
use the condition specified in the schema. Implicitly defined
objects inherit their condition from their users. For most of them,
there is exactly one user, so the condition to use is obvious. The
exception is the wrapper types generated for simple union variants,
which can be shared by any number of simple unions. The tight
condition would be the disjunction of the conditions of these simple
unions. For now, use wrapped type's condition instead. Much
simpler and good enough for now.
[...]