qmp-input-visitor: Favor new visit_free() function
commitb70ce1018a251c0c33498d9c927a07cade655a5e
authorEric Blake <eblake@redhat.com>
Thu, 9 Jun 2016 16:48:38 +0000 (9 10:48 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 6 Jul 2016 08:52:04 +0000 (6 10:52 +0200)
tree6f11b7166523750427c3bdf8f468567a80a0aea5
parent7a0525c7be6b38d32d586e3fd12e7377ded21faa
qmp-input-visitor: Favor new visit_free() function

Now that we have a polymorphic visit_free(), we no longer need
qmp_input_visitor_cleanup(); which in turn means we no longer
need to return a subtype from qmp_input_visitor_new() nor a
public upcast function.

Generated code changes to qmp-marshal.c look like:

|@@ -52,11 +52,10 @@ void qmp_marshal_add_fd(QDict *args, QOb
| {
|     Error *err = NULL;
|     AddfdInfo *retval;
|-    QmpInputVisitor *qiv = qmp_input_visitor_new(QOBJECT(args), true);
|     Visitor *v;
|     q_obj_add_fd_arg arg = {0};
|
|-    v = qmp_input_get_visitor(qiv);
|+    v = qmp_input_visitor_new(QOBJECT(args), true);
|     visit_start_struct(v, NULL, NULL, 0, &err);
|     if (err) {
|         goto out;

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-8-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
13 files changed:
docs/qapi-code-gen.txt
include/qapi/qmp-input-visitor.h
qapi/qmp-input-visitor.c
qmp.c
qom/qom-qobject.c
replay/replay-input.c
scripts/qapi-commands.py
tests/check-qnull.c
tests/test-qmp-commands.c
tests/test-qmp-input-strict.c
tests/test-qmp-input-visitor.c
tests/test-visitor-serialization.c
util/qemu-sockets.c