diff options
Diffstat (limited to 'include/qapi')
-rw-r--r-- | include/qapi/visitor-impl.h | 2 | ||||
-rw-r--r-- | include/qapi/visitor.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h index 7cd1313129..74196847fa 100644 --- a/include/qapi/visitor-impl.h +++ b/include/qapi/visitor-impl.h @@ -33,7 +33,7 @@ struct Visitor void (*type_enum)(Visitor *v, int *obj, const char * const strings[], const char *kind, const char *name, Error **errp); /* May be NULL; only needed for input visitors. */ - void (*get_next_type)(Visitor *v, QType *type, + void (*get_next_type)(Visitor *v, QType *type, bool promote_int, const char *name, Error **errp); void (*type_int)(Visitor *v, int64_t *obj, const char *name, Error **errp); diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 6d25ad27a2..1414de1b0d 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -43,8 +43,9 @@ void visit_optional(Visitor *v, bool *present, const char *name, * Determine the qtype of the item @name in the current object visit. * For input visitors, set *@type to the correct qtype of a qapi * alternate type; for other visitors, leave *@type unchanged. + * If @promote_int, treat integers as QTYPE_FLOAT. */ -void visit_get_next_type(Visitor *v, QType *type, +void visit_get_next_type(Visitor *v, QType *type, bool promote_int, const char *name, Error **errp); void visit_type_enum(Visitor *v, int *obj, const char * const strings[], const char *kind, const char *name, Error **errp); |