On 05/06/2016 08:08 AM, Eric Blake wrote: > On 05/06/2016 06:31 AM, Markus Armbruster wrote: >>> So all that's left are the two output functions. Can we get rid >>> of those, and make Visitor* the only public interface, rather than >>> making every caller have to do upcasts? >> >> The two output functions are >> >> QObject *qmp_output_get_qobject(QmpOutputVisitor *v); >> char *string_output_get_string(StringOutputVisitor *v); >> >>> It looks like outside of the testsuite, all uses of these visitors are >>> local to a single function; and improving the testsuite is not the end >>> of the world. Particularly if only the testsuite is using reset, it may >>> be easier to just patch the testsuite to use a new visitor in the places >>> where it currently does a reset. >> >> I'm okay with replacing reset by destroy + new in the test suite. > > That part's (relatively) easy, so it will be in the next spin.
In fact, it's easier to replace that part in the existing qapi-next branch than it is to revert the addition of qmp_output_visitor_reset(); see patch posted in the other thread (v16A 17/24). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature