Received: from eggs.gnu.org ([2001:4830:134:3::10]:46121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNDxt-0005qX-H4 for qemu-devel@nongnu.org; Thu, 06 Aug 2015 01:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNDxp-0006sn-GC for qemu-devel@nongnu.org; Thu, 06 Aug 2015 01:43:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNDxp-0006sh-Aa for qemu-devel@nongnu.org; Thu, 06 Aug 2015 01:43:37 -0400 From: Markus Armbruster References: <1438679896-5077-1-git-send-email-armbru@redhat.com> <1438679896-5077-22-git-send-email-armbru@redhat.com> <55C0FE8A.9040000@redhat.com> <871tfiwbfc.fsf@blackfin.pond.sub.org> <55C21C29.5050404@redhat.com> Date: Thu, 06 Aug 2015 07:43:34 +0200 In-Reply-To: <55C21C29.5050404@redhat.com> (Eric Blake's message of "Wed, 5 Aug 2015 08:22:33 -0600") Message-ID: <87r3nhj7jt.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 21/26] qapi: Command returning anonymous type doesn't work, outlaw List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Eric Blake writes: > On 08/04/2015 11:29 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 08/04/2015 03:18 AM, Markus Armbruster wrote: >>>> Reproducer: with >>>> >>>> { 'command': 'user_def_cmd4', 'returns': { 'a': 'int' } } >>>> >>>> added to qapi-schema-test.json, qapi-commands.py dies when it tries to >>>> generate the command handler function >>>> > >>> +++ w/tests/qapi-schema/command-int.json >>> @@ -1,3 +1,4 @@ >>> # we reject collisions between commands and types >>> { 'command': 'int', 'data': { 'character': 'str' }, >>> - 'returns': { 'value': 'int' } } >>> + 'returns': 'Foo' } >>> +{ 'struct': 'Foo', 'data': { 'value': 'int' } } >> >> Okay to simply drop the 'returns' instead? >> > > Sure, that works too. Done, with commit message amended: Simply outlaw this usage, and drop or dumb down test cases accordingly.