[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: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v2 22/54] qapi-introspect: add preprocessor conditions to generated QLit |
Date: |
Wed, 6 Sep 2017 10:26:25 -0400 (EDT) |
----- Original Message -----
> 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.
>
fixed, thanks