Received: from eggs.gnu.org ([2001:4830:134:3::10]:40892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpAnR-00010D-Vn for qemu-devel@nongnu.org; Mon, 04 May 2015 03:28:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpAnO-000618-OZ for qemu-devel@nongnu.org; Mon, 04 May 2015 03:28:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpAnO-000614-Jb for qemu-devel@nongnu.org; Mon, 04 May 2015 03:28:06 -0400 From: Markus Armbruster References: <1430312814-19706-1-git-send-email-eblake@redhat.com> <1430312814-19706-37-git-send-email-eblake@redhat.com> <5543E020.5040208@redhat.com> Date: Mon, 04 May 2015 09:28:03 +0200 In-Reply-To: <5543E020.5040208@redhat.com> (Eric Blake's message of "Fri, 01 May 2015 14:20:48 -0600") Message-ID: <871tiwiyyk.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, berto@igalia.com, qemu-devel@nongnu.org Eric Blake writes: > On 04/29/2015 07:06 AM, Eric Blake wrote: >> A future patch will be using a 'name':{dictionary} entry in the >> QAPI schema to specify a default value for an optional argument >> (see previous commit messages for more details why); but existing >> use of inline nested structs conflicts with that goal. Now that >> all commands have been changed to avoid inline nested structs, >> nuke support for them, and turn it into a hard error. Update the >> testsuite to reflect tighter parsing rules. >> >> Signed-off-by: Eric Blake >> Reviewed-by: Markus Armbruster >> --- >> scripts/qapi-commands.py | 8 +++--- >> scripts/qapi-event.py | 4 +-- >> scripts/qapi-types.py | 9 ++----- >> scripts/qapi-visit.py | 37 ++++------------------------ >> scripts/qapi.py | 20 ++++++--------- > >> +++ b/scripts/qapi-visit.py >> @@ -51,27 +51,6 @@ def generate_visit_struct_fields(name, field_prefix, fn_prefix, members, base = >> else: >> full_name = "%s_%s" % (name, fn_prefix) >> >> - for argname, argentry, optional, structured in parse_args(members): >> - if structured: >> - if not fn_prefix: >> - nested_fn_prefix = argname >> - else: >> - nested_fn_prefix = "%s_%s" % (fn_prefix, argname) >> - >> - nested_field_prefix = "%s%s." % (field_prefix, argname) >> - ret += generate_visit_struct_fields(name, nested_field_prefix, >> - nested_fn_prefix, argentry) > > This is the only place that calls generate_visit_struct_fields with a > non-empty string for prefix arguments; I've got a cleanup patch that we > can either squash into this patch or leave as standalone. Squash vs. separate patch: your choice.