diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-09-16 13:06:24 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-09-21 09:56:49 +0200 |
commit | 28770e057f265a4e70bcbdfc2447cce7b5f2dc19 (patch) | |
tree | e0da3cb258bdbb19e46ab4868cd887dd064ee3db /include/qapi | |
parent | 6c2f9a15dfc8c18ba94defb0f819109902a817cb (diff) | |
download | qemu-28770e057f265a4e70bcbdfc2447cce7b5f2dc19.zip qemu-28770e057f265a4e70bcbdfc2447cce7b5f2dc19.tar.gz qemu-28770e057f265a4e70bcbdfc2447cce7b5f2dc19.tar.bz2 |
qapi: Introduce a first class 'any' type
It's first class, because unlike '**', it actually works, i.e. doesn't
require 'gen': false.
'**' will go away next.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include/qapi')
-rw-r--r-- | include/qapi/visitor-impl.h | 2 | ||||
-rw-r--r-- | include/qapi/visitor.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h index f4a2f74..8c0ba57 100644 --- a/include/qapi/visitor-impl.h +++ b/include/qapi/visitor-impl.h @@ -40,6 +40,8 @@ struct Visitor void (*type_str)(Visitor *v, char **obj, const char *name, Error **errp); void (*type_number)(Visitor *v, double *obj, const char *name, Error **errp); + void (*type_any)(Visitor *v, QObject **obj, const char *name, + Error **errp); /* May be NULL */ void (*optional)(Visitor *v, bool *present, const char *name, diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 00ba104..cfc19a6 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -58,6 +58,7 @@ void visit_type_size(Visitor *v, uint64_t *obj, const char *name, Error **errp); void visit_type_bool(Visitor *v, bool *obj, const char *name, Error **errp); void visit_type_str(Visitor *v, char **obj, const char *name, Error **errp); void visit_type_number(Visitor *v, double *obj, const char *name, Error **errp); +void visit_type_any(Visitor *v, QObject **obj, const char *name, Error **errp); bool visit_start_union(Visitor *v, bool data_present, Error **errp); void visit_end_union(Visitor *v, bool data_present, Error **errp); |