[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 18/32] qapi: Replace dirty is_c_ptr() by
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 18/32] qapi: Replace dirty is_c_ptr() by method c_null() |
Date: |
Wed, 5 Aug 2015 10:13:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 08/04/2015 09:58 AM, Markus Armbruster wrote:
> is_c_ptr() looks whether the end of the C text for the type looks like
> a pointer. Works, but is fragile.
>
> We now have a better tool: use QAPISchemaType method c_null(). The
> initializers for non-pointers become prettier: 0, false or the
> enumeration constant with the value 0 instead of {0}.
>
> One place looks suspicious: we initialize pointers, but not
> non-pointers. Either the initialization is superfluous and should be
> deleted, or the non-pointers need it as well, or something subtle is
> going on and needs a comment. Since I lack the time to figure it out
> now, mark it FIXME.
Dead paragraph.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> scripts/qapi-commands.py | 16 +++++-----------
> scripts/qapi.py | 3 ---
> 2 files changed, 5 insertions(+), 14 deletions(-)
>
With fixed commit message,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH RFC v3 03/32] qapi: QAPISchema code generation helper methods, (continued)
[Qemu-devel] [PATCH RFC v3 08/32] Revert "qapi: Generate comments to simplify splitting for review", Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 12/32] qapi-commands: Convert to QAPISchemaVisitor, Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 18/32] qapi: Replace dirty is_c_ptr() by method c_null(), Markus Armbruster, 2015/08/04
- Re: [Qemu-devel] [PATCH RFC v3 18/32] qapi: Replace dirty is_c_ptr() by method c_null(),
Eric Blake <=
[Qemu-devel] [PATCH RFC v3 13/32] qapi: De-duplicate enum code generation, Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 23/32] qapi: De-duplicate parameter list generation, Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 21/32] qapi-commands: Rearrange code, Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 07/32] qapi: Generate comments to simplify splitting for review, Markus Armbruster, 2015/08/04
[Qemu-devel] [PATCH RFC v3 11/32] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs, Markus Armbruster, 2015/08/04