[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/26] qapi: Improve built-in type documentation
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 19/26] qapi: Improve built-in type documentation |
Date: |
Mon, 21 Sep 2015 10:03:53 +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>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Message-Id: <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 0884b58..5c2c278 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 ===
--
2.4.3
- [Qemu-devel] [PULL 10/26] qapi-event: Eliminate global variable event_enum_value, (continued)
- [Qemu-devel] [PULL 10/26] qapi-event: Eliminate global variable event_enum_value, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 14/26] qapi-visit: Rearrange code a bit, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 02/26] qapi: New QAPISchema intermediate reperesentation, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 23/26] qapi-schema: Fix up misleading specification of netdev_add, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 20/26] qapi: Make output visitor return qnull() instead of NULL, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 18/26] qapi-commands: De-duplicate output marshaling functions, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 15/26] qapi-commands: Rearrange code, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 17/26] qapi: De-duplicate parameter list generation, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 05/26] tests/qapi-schema: Convert test harness to QAPISchemaVisitor, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 19/26] qapi: Improve built-in type documentation,
Markus Armbruster <=
- [Qemu-devel] [PULL 22/26] qom: Don't use 'gen': false for qom-get, qom-set, object-add, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 26/26] qapi-introspect: Hide type names, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 24/26] qapi: Pseudo-type '**' is now unused, drop it, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 13/26] qapi: Clean up after recent conversions to QAPISchemaVisitor, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 07/26] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 21/26] qapi: Introduce a first class 'any' type, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 25/26] qapi: New QMP command query-qmp-schema for QMP introspection, Markus Armbruster, 2015/09/21
- [Qemu-devel] [PULL 16/26] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO(), Markus Armbruster, 2015/09/21
- Re: [Qemu-devel] [PULL 00/26] qapi: QMP introspection, Peter Maydell, 2015/09/21