[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.9 04/17] keyval: Document issues with 'any' and
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL for-2.9 04/17] keyval: Document issues with 'any' and alternate types |
Date: |
Wed, 22 Mar 2017 17:05:35 +0100 |
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
util/keyval.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/util/keyval.c b/util/keyval.c
index 46cd540..93d5db6 100644
--- a/util/keyval.c
+++ b/util/keyval.c
@@ -61,6 +61,16 @@
* "key absent" already means "optional object/array absent", which
* isn't the same as "empty object/array present".
*
+ * Design flaw: scalar values can only be strings; there is no way to
+ * denote numbers, true, false or null. The special QObject input
+ * visitor returned by qobject_input_visitor_new_keyval() mostly hides
+ * this by automatically converting strings to the type the visitor
+ * expects. Breaks down for alternate types and type 'any', where the
+ * visitor's expectation isn't clear. Code visiting such types needs
+ * to do the conversion itself, but only when using this keyval
+ * visitor. Awkward. Alternate types without a string member don't
+ * work at all.
+ *
* Additional syntax for use with an implied key:
*
* key-vals-ik = val-no-key [ ',' key-vals ]
--
2.7.4
- [Qemu-devel] [PULL for-2.9 07/17] qapi2texi: Fix to actually fail when 'doc-required' is false, (continued)
- [Qemu-devel] [PULL for-2.9 07/17] qapi2texi: Fix to actually fail when 'doc-required' is false, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 12/17] qapi: Fix string input visitor regression for empty lists, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 13/17] Revert "hostmem: fix QEMU crash by 'info memdev'", Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 16/17] qom: Avoid unvisited 'id'/'qom-type' in user_creatable_add_opts, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 02/17] keyval: Improve some comments, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 01/17] test-keyval: Tweaks to improve list coverage, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 17/17] qapi: Fix QemuOpts visitor regression on unvisited input, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 09/17] tests/qapi-schema: Make test-qapi.py print docs again, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 05/17] MAINTAINERS: Add myself for files I touched recently, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 10/17] tests/qapi-schema: Systematic positive doc comment tests, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 04/17] keyval: Document issues with 'any' and alternate types,
Markus Armbruster <=
- [Qemu-devel] [PULL for-2.9 11/17] qapi2texi: Fix translation of *strong* and _emphasized_, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 06/17] qapi: Drop excessive Make dependencies on qapi2texi.py, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 15/17] tests: Expose regression in QemuOpts visitor, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 08/17] qapi: Drop unused QAPIDoc member optional, Markus Armbruster, 2017/03/22
- [Qemu-devel] [PULL for-2.9 03/17] test-keyval: Cover alternate and 'any' type, Markus Armbruster, 2017/03/22