diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-07-24 13:21:33 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-24 13:21:33 +0100 |
| commit | cf44d31d35df3de9d4f49339254050195f777f3e (patch) | |
| tree | 86c483b7cb76865aaa58786d917d68e9dab5a530 /scripts/qapi.py | |
| parent | 5dd8990841a9e331d9d4838a116291698208cbb6 (diff) | |
| parent | 01fa55982692fb51a16049b63b571651a1053989 (diff) | |
| download | focaccia-qemu-cf44d31d35df3de9d4f49339254050195f777f3e.tar.gz focaccia-qemu-cf44d31d35df3de9d4f49339254050195f777f3e.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-18-v2' into staging
QAPI patches for 2017-07-18 # gpg: Signature made Mon 24 Jul 2017 12:40:56 BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2017-07-18-v2: migration: Use JSON null instead of "" to reset parameter to default migration: Unshare MigrationParameters struct for now migration: Add TODO comments on duplication of QAPI_CLONE() migration: Clean up around tls_creds, tls_hostname hmp: Clean up and simplify hmp_migrate_set_parameter() block: Use JSON null instead of "" to disable backing file tests/test-qobject-input-visitor: Drop redundant test qapi: Introduce a first class 'null' type qapi: Use QNull for a more regular visit_type_null() qapi: Separate type QNull from QObject Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/qapi.py')
| -rw-r--r-- | scripts/qapi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 84e2eb441b..8aa2775f12 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -20,6 +20,7 @@ import sys from ordereddict import OrderedDict builtin_types = { + 'null': 'QTYPE_QNULL', 'str': 'QTYPE_QSTRING', 'int': 'QTYPE_QNUM', 'number': 'QTYPE_QNUM', @@ -1056,6 +1057,7 @@ class QAPISchemaType(QAPISchemaEntity): def alternate_qtype(self): json2qtype = { + 'null': 'QTYPE_QNULL', 'string': 'QTYPE_QSTRING', 'number': 'QTYPE_QNUM', 'int': 'QTYPE_QNUM', @@ -1515,7 +1517,8 @@ class QAPISchema(object): ('uint64', 'int', 'uint64_t'), ('size', 'int', 'uint64_t'), ('bool', 'boolean', 'bool'), - ('any', 'value', 'QObject' + pointer_suffix)]: + ('any', 'value', 'QObject' + pointer_suffix), + ('null', 'null', 'QNull' + pointer_suffix)]: self._def_builtin_type(*t) self.the_empty_object_type = QAPISchemaObjectType( 'q_empty', None, None, None, [], None) |