[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!
[Qemu-devel] [RFC PATCH 12/32] qapi: Use argparse to parse command line arguments, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 17/32] qapi: Fix simple union lowering with multiple schemas, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 15/32] tests/qapi-schema: Improve simple union coverage, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 11/32] qapi: Drop the options to generate only .c or .h, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 07/32] qapi: Drop superfluous allow_optional=True, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 03/32] qapi2texi: Fix for examples containing '@', Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 26/32] qapi2texi: Include command line options information, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 27/32] os-posix: Drop misleading comment, Markus Armbruster, 2017/10/02
[Qemu-devel] [RFC PATCH 14/32] qapi: Rework generated code for built-in types, Markus Armbruster, 2017/10/02