diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/qapi-code-gen.txt | 12 |
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; |