qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 15/32] tests/qapi-schema: Improve simple uni


From: Markus Armbruster
Subject: Re: [Qemu-devel] [RFC PATCH 15/32] tests/qapi-schema: Improve simple union coverage
Date: Thu, 05 Oct 2017 06:29:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> On Mon, Oct 2, 2017 at 5:25 PM, Markus Armbruster <address@hidden> wrote:
>> This demonstrates a bug in the lowering of simple unions: if more than
>> one schema uses the same built-in type T for a simple union member,
>> they all generate the same q_obj_T_wrapper into their qapi-types.h.
>> They clash when you include more than one schema's qapi-types.h.
>
> Ah, I don't remember seeing that when I splitted the schema in my
> qapi-if / conditional series.

Simple union members of built-in type are rare.  I spotted the problem
with options, then realized it's already possible with simple unions.

> Could it happen with non-built-in types ?

Yes, but multiple q_obj_T_wrapper can clash only when their T also
clash.  Name your types more wisely then.

>> Signed-off-by: Markus Armbruster <address@hidden>
>
> Reviewed-by: Marc-André Lureau <address@hidden>

Thanks!



reply via email to

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