diff options
Diffstat (limited to 'qom/qom-qobject.c')
-rw-r--r-- | qom/qom-qobject.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/qom/qom-qobject.c b/qom/qom-qobject.c index b66088d730..c225abcbad 100644 --- a/qom/qom-qobject.c +++ b/qom/qom-qobject.c @@ -21,12 +21,11 @@ void object_property_set_qobject(Object *obj, QObject *value, const char *name, Error **errp) { - QmpInputVisitor *qiv; + Visitor *v; /* TODO: Should we reject, rather than ignore, excess input? */ - qiv = qmp_input_visitor_new(value, false); - object_property_set(obj, qmp_input_get_visitor(qiv), name, errp); - - qmp_input_visitor_cleanup(qiv); + v = qmp_input_visitor_new(value, false); + object_property_set(obj, v, name, errp); + visit_free(v); } QObject *object_property_get_qobject(Object *obj, const char *name, @@ -34,14 +33,14 @@ QObject *object_property_get_qobject(Object *obj, const char *name, { QObject *ret = NULL; Error *local_err = NULL; - QmpOutputVisitor *qov; + Visitor *v; - qov = qmp_output_visitor_new(); - object_property_get(obj, qmp_output_get_visitor(qov), name, &local_err); + v = qmp_output_visitor_new(&ret); + object_property_get(obj, v, name, &local_err); if (!local_err) { - ret = qmp_output_get_qobject(qov); + visit_complete(v, &ret); } error_propagate(errp, local_err); - qmp_output_visitor_cleanup(qov); + visit_free(v); return ret; } |