Received: from eggs.gnu.org ([2001:4830:134:3::10]:53943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axyzf-0000PM-Kk for qemu-devel@nongnu.org; Wed, 04 May 2016 11:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axyzU-0007z5-0B for qemu-devel@nongnu.org; Wed, 04 May 2016 11:45:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axyzT-0007vc-Ox for qemu-devel@nongnu.org; Wed, 04 May 2016 11:45:31 -0400 From: Markus Armbruster References: <1461903820-3092-1-git-send-email-eblake@redhat.com> <1461903820-3092-8-git-send-email-eblake@redhat.com> <87lh3som6o.fsf@dusky.pond.sub.org> <57276E26.5020006@redhat.com> <87r3dja6ue.fsf@dusky.pond.sub.org> Date: Wed, 04 May 2016 17:45:18 +0200 In-Reply-To: <87r3dja6ue.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Tue, 03 May 2016 10:22:49 +0200") Message-ID: <87wpn9esj5.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 07/18] qapi: Add json output visitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: famz@redhat.com, qemu-devel@nongnu.org, Michael Roth Markus Armbruster writes: > Eric Blake 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. [...]