[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects. |
Date: |
Mon, 07 Sep 2015 08:58:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> We have a few fields that exist mainly to hold information from
> __init__() until check() (matching the fact that parsing is
> two-pass; the first to find type names, the second to associate
> types together while honoring forward references), or which should
> only be used through accessor methods. We should not use these
> fields directly in other files after check() has run, so use the
> python convention of naming these fields with leading underscore
> to mark their internal usage, and to check that no one else was
> using them.
>
> Exception: our crazy handling of simple unions (with a C member
> 'kind' matching the QMP wire 'type') requires peeking through
> the hidden field. This leaky abstraction will be cleaned up in
> a later patch.
There are two more peeks: QAPISchemaAlternateType peeks when it asserts
it got simple variants, and test-qapi.py peeks when it prints a flat
union's tag. You missed the latter, and neglected to mention the
former.
> Signed-off-by: Eric Blake <address@hidden>
> ---
>
> Technically, I wrote this patch after 32; if you decide to rebase
> it into the series, you'll have to split it among 2, 10, 11, and 30.
> Up to you if you want to squash this in during your spin of v5, or
> if you want me to keep it as a separate patch for inclusion after
> your series.
I doubt the improvement worth the churn as a follow-up patch. Instead,
I'll squash it in, less the rename of .tag_name, plus a few more renames
elsewhere.
Thanks!
- Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation, (continued)
Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation, Eric Blake, 2015/09/03
Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation, Eric Blake, 2015/09/04
- Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects., Eric Blake, 2015/09/04
- Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects., Eric Blake, 2015/09/05
- Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects., Eric Blake, 2015/09/05
- Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects., Eric Blake, 2015/09/05
- Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects., Markus Armbruster, 2015/09/07
Re: [Qemu-devel] [PATCH RFC v4 02.5/32] qapi: Hide internal data members of schema objects.,
Markus Armbruster <=
[Qemu-devel] [PATCH RFC v4 31/32] qapi-introspect: Map all integer types to 'int', Markus Armbruster, 2015/09/03
[Qemu-devel] [PATCH RFC v4 25/32] qapi: Improve built-in type documentation, Markus Armbruster, 2015/09/03
[Qemu-devel] [PATCH RFC v4 28/32] qapi-schema: Fix up misleading specification of netdev_add, Markus Armbruster, 2015/09/03
[Qemu-devel] [PATCH RFC v4 17/32] Revert "qapi: Generate comments to simplify splitting for review", Markus Armbruster, 2015/09/03
[Qemu-devel] [PATCH RFC v4 16/32] qapi: Generate comments to simplify splitting for review, Markus Armbruster, 2015/09/03
[Qemu-devel] [PATCH RFC v4 05/32] tests/qapi-schema: Convert test harness to QAPISchemaVisitor, Markus Armbruster, 2015/09/03