aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-07-01 16:55:15 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 15:47:16 +0200
commit3a864e7c52af15017d5082a9ee39a7919f46d2b5 (patch)
treee12802f60d150a3b739e67d9674a44a6eca35882 /docs
parent3f99144cd9afbf51a7fbddf20b921402c2d4f68c (diff)
qapi: Generated code cleanup
Clean up white-space, brace placement, and superfluous #ifdef QAPI_TYPES_BUILTIN_CLEANUP_DEF. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/qapi-code-gen.txt12
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index 7cb852e614..b4d4a0176b 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -568,7 +568,6 @@ Example:
visit_type_UserDefOne(v, &obj, NULL, NULL);
qapi_dealloc_visitor_cleanup(md);
}
-
$ cat qapi-generated/example-qapi-types.h
[Uninteresting stuff omitted...]
@@ -579,8 +578,7 @@ Example:
typedef struct UserDefOne UserDefOne;
- typedef struct UserDefOneList
- {
+ typedef struct UserDefOneList {
union {
UserDefOne *value;
uint64_t padding;
@@ -588,10 +586,10 @@ Example:
struct UserDefOneList *next;
} UserDefOneList;
+
[Functions on built-in types omitted...]
- struct UserDefOne
- {
+ struct UserDefOne {
int64_t integer;
char *string;
};
@@ -629,6 +627,7 @@ Example:
static void visit_type_UserDefOne_fields(Visitor *m, UserDefOne **obj, Error **errp)
{
Error *err = NULL;
+
visit_type_int(m, &(*obj)->integer, "integer", &err);
if (err) {
goto out;
@@ -842,8 +841,7 @@ Example:
void qapi_event_send_my_event(Error **errp);
extern const char *example_QAPIEvent_lookup[];
- typedef enum example_QAPIEvent
- {
+ typedef enum example_QAPIEvent {
EXAMPLE_QAPI_EVENT_MY_EVENT = 0,
EXAMPLE_QAPI_EVENT_MAX = 1,
} example_QAPIEvent;