[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v2 39/47] qapi: Improve built-in type documentat
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH RFC v2 39/47] qapi: Improve built-in type documentation |
Date: |
Wed, 1 Jul 2015 22:22:27 +0200 |
Clarify how they map to JSON. Add how they map to C. Fix the
reference to StringInputVisitor.
Signed-off-by: Markus Armbruster <address@hidden>
---
docs/qapi-code-gen.txt | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index 83af531..cb0fe75 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -140,17 +140,24 @@ must have a value that forms a struct name.
=== Built-in Types ===
-The following types are built-in to the parser:
- 'str' - arbitrary UTF-8 string
- 'int' - 64-bit signed integer (although the C code may place further
- restrictions on acceptable range)
- 'number' - floating point number
- 'bool' - JSON value of true or false
- 'int8', 'int16', 'int32', 'int64' - like 'int', but enforce maximum
- bit size
- 'uint8', 'uint16', 'uint32', 'uint64' - unsigned counterparts
- 'size' - like 'uint64', but allows scaled suffix from command line
- visitor
+The following types are predefined, and map to C as follows:
+
+ Schema C JSON
+ str char * any JSON string, UTF-8
+ number double any JSON number
+ int int64_t a JSON number without fractional part
+ that fits into the C integer type
+ int8 int8_t likewise
+ int16 int16_t likewise
+ int32 int32_t likewise
+ int64 int64_t likewise
+ uint8 uint8_t likewise
+ uint16 uint16_t likewise
+ uint32 uint32_t likewise
+ uint64 uint64_t likewise
+ size uint64_t like uint64_t, except StringInputVisitor
+ accepts size suffixes
+ bool bool JSON true or false
=== Includes ===
--
1.9.3
- [Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor, (continued)
- [Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 43/47] qmp: Improve netdev_add usage example in the manual, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 46/47] qapi-introspect: Map all integer types to 'int', Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 39/47] qapi: Improve built-in type documentation,
Markus Armbruster <=
- [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 21/47] qapi: New QAPISchema intermediate reperesentation, Markus Armbruster, 2015/07/01
- [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names, Markus Armbruster, 2015/07/01