aboutsummaryrefslogtreecommitdiff
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-06-09 10:48:36 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-07-06 10:52:04 +0200
commit09204eac9bb513e56992c00c75f32f9d4766256b (patch)
treea83c6884b990b0d3782cc1f40f69787085f4a6cd /qom/object_interfaces.c
parent2c0ef9f411ae6081efa9eca5b3eab2dbeee45a6c (diff)
opts-visitor: Favor new visit_free() function
Now that we have a polymorphic visit_free(), we no longer need opts_visitor_cleanup(); which in turn means we no longer need to return a subtype from opts_visitor_new() nor a public upcast function. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1465490926-28625-6-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 926ec68204..bf598468ab 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -156,15 +156,15 @@ out:
Object *user_creatable_add_opts(QemuOpts *opts, Error **errp)
{
- OptsVisitor *ov;
+ Visitor *v;
QDict *pdict;
Object *obj = NULL;
- ov = opts_visitor_new(opts);
+ v = opts_visitor_new(opts);
pdict = qemu_opts_to_qdict(opts, NULL);
- obj = user_creatable_add(pdict, opts_get_visitor(ov), errp);
- opts_visitor_cleanup(ov);
+ obj = user_creatable_add(pdict, v, errp);
+ visit_free(v);
QDECREF(pdict);
return obj;
}