On 06/03/2016 01:56 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> Similar to pretty printing in the QObject visitor. The trickiest >> part is probably that the testsuite now has to honor parameterization >> on whether pretty printing is enabled. > > Worth mentioning that the pretty-printing matches the one in > qobject-json.c?
Yes, particularly since we later rely on that fact to rewrite qobject-json.c on top of the JSON visitor :) >> static void visitor_output_setup(TestOutputVisitorData *data, >> - const void *unused) >> + const void *arg) >> { >> - data->ov = json_output_visitor_new(&data->str); >> + const bool *pretty = arg; > > Could do bool pretty = *(bool *)arg. Matter of taste. Same elsewhere. Requires a cast. I like avoiding casts where C lets us do so. But I also agree that *pretty looks ugly, so maybe: ...(const void *arg) { const bool *data; bool pretty = *data; -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature