Markus Armbruster <arm...@redhat.com> writes: > Eric Blake <ebl...@redhat.com> writes: > >> On 05/02/2016 03:15 AM, Markus Armbruster wrote: [...] >>>> +/* >>>> + * The JSON output visitor does not accept Infinity or NaN to >>>> + * visit_type_number(). >>>> + */ >>>> +JsonOutputVisitor *json_output_visitor_new(void); >>>> +void json_output_visitor_cleanup(JsonOutputVisitor *v); >>>> +void json_output_visitor_reset(JsonOutputVisitor *v); >>> >>> Hmm. Why is "reset" not a Visitor method? >>> >>> I think this would let us put the things enforced by your "qmp: Tighten >>> output visitor rules" in the Visitor contract. >> >> I thought about that, and now that you've mentioned it, I'll probably >> give it a try (that is, make visit_reset() a top-level construct that >> ALL visitors must support, rather than just qmp-output and json-output). > > Yes, please.
Same question for "cleanup". Stupid name for a destructor, by the way. [...]