From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDYZ9-00034m-Pz for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDYZ6-00029g-56 for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:46:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDYZ5-00029X-Vv for qemu-devel@nongnu.org; Thu, 16 Jun 2016 10:46:40 -0400 From: Markus Armbruster References: <1463784024-17242-1-git-send-email-eblake@redhat.com> <1463784024-17242-2-git-send-email-eblake@redhat.com> <877fdsdk3v.fsf@dusky.pond.sub.org> Date: Thu, 16 Jun 2016 16:46:37 +0200 In-Reply-To: <877fdsdk3v.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Tue, 14 Jun 2016 14:35:00 +0200") Message-ID: <87mvmlyywi.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v7 01/15] qapi: Consolidate object visitors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Michael Roth Markus Armbruster writes: > Eric Blake writes: > >> Rather than having two separate visitor callbacks with items >> already broken out, pass the actual QAPISchemaObjectType object >> to the visitor. This lets the visitor access things like >> type.is_implicit() without needing another parameter, resolving >> a TODO from previous patches. >> >> For convenience and consistency, the 'name' and 'info' parameters >> are still provided, even though they are now redundant with >> 'typ.name' and 'typ.info'. >> >> Signed-off-by: Eric Blake > > We've seen this one before :) > > The previous review is relevant: > Message-ID: <878u0hn08l.fsf@dusky.pond.sub.org> > http://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02151.html > > Quote its recap of pros and cons: > > * The existing interface > > def visit_object_type(self, name, info, base, members, variants): > def visit_object_type_flat(self, name, info, members, variants): > > is explicit and narrow, but when you need more information, you have > to add parameters or functions. > > * The new interface > > def visit_object_type(self, name, info, typ): > > avoids that, but now its users can access everything. > > End quote. Let's see how this series profits from the patch, and > whether we want to change the other visit methods as well for > consistency. Where is this used in the rest of the series?