]> git.proxmox.com Git - qemu.git/commit - scripts/qapi-visit.py
qapi: Flat unions with arbitrary discriminator
authorKevin Wolf <kwolf@redhat.com>
Wed, 3 Jul 2013 13:58:57 +0000 (15:58 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 26 Jul 2013 19:09:37 +0000 (21:09 +0200)
commit50f2bdc75c5ee00617ad874c9ceac2cea660aa1e
tree331eee5391b95110ce3960b5623dcf8646f65e57
parent761d524dbcc5bb41213dd0f238f43c273bc2b077
qapi: Flat unions with arbitrary discriminator

Instead of the rather verbose syntax that distinguishes base and
subclass fields...

  { "type": "file",
    "read-only": true,
    "data": {
        "filename": "test"
    } }

...we can now have both in the same namespace, allowing a more direct
mapping of the command line, and moving fields between the common base
and subclasses without breaking the API:

  { "driver": "file",
    "read-only": true,
    "filename": "test" }

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
docs/qapi-code-gen.txt
scripts/qapi-types.py
scripts/qapi-visit.py