qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 22/54] qapi-introspect: add preprocessor cond


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 22/54] qapi-introspect: add preprocessor conditions to generated QLit
Date: Wed, 06 Sep 2017 13:38:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

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

> Add 'ifcond' condition to QLit objects.
>
> to_qlit() handles the (obj, ifcond) tuples.
>
> Signed-off-by: Marc-André Lureau <address@hidden>

I my testing, the generated code changes like this:

    diff -rup qapi-gen-21-64300535f0/test-qmp-introspect.c 
qapi-gen-22-050f2a5d9d/test-qmp-introspect.c
    --- qapi-gen-21-64300535f0/test-qmp-introspect.c    2017-09-06 
12:02:11.808681800 +0200
    +++ qapi-gen-22-050f2a5d9d/test-qmp-introspect.c    2017-09-06 
12:02:19.085578791 +0200
    @@ -51,19 +51,31 @@ const QLitObject test_qmp_schema_qlit =
             { "name", QLIT_QSTR("EVENT_F") },
             {}
         })),
    -    QLIT_QDICT(((QLitDictEntry[]) {
    +    
    +#if defined(TEST_IF_CMD) && defined(TEST_IF_STRUCT)
    +
--> +QLIT_QDICT(((QLitDictEntry[]) {
             { "arg-type", QLIT_QSTR("5") },
             { "meta-type", QLIT_QSTR("command") },
             { "name", QLIT_QSTR("TestIfCmd") },

Indentation's off at the line I marked.



reply via email to

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