From patchwork Sat Feb 20 00:19:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 8365231 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4359E9F2F0 for ; Sat, 20 Feb 2016 00:24:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A94AB20570 for ; Sat, 20 Feb 2016 00:24:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05C7B200D0 for ; Sat, 20 Feb 2016 00:24:58 +0000 (UTC) Received: from localhost ([::1]:56547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWvM1-00051k-DF for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 19:24:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWvHI-0004pQ-Al for qemu-devel@nongnu.org; Fri, 19 Feb 2016 19:20:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWvHF-000408-PU for qemu-devel@nongnu.org; Fri, 19 Feb 2016 19:20:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWvHF-0003zl-LF for qemu-devel@nongnu.org; Fri, 19 Feb 2016 19:20:01 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 5C25664368 for ; Sat, 20 Feb 2016 00:20:01 +0000 (UTC) Received: from red.redhat.com (ovpn-113-75.phx2.redhat.com [10.3.113.75]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1K0Jn6W025514; Fri, 19 Feb 2016 19:20:01 -0500 From: Eric Blake To: qemu-devel@nongnu.org Date: Fri, 19 Feb 2016 17:19:45 -0700 Message-Id: <1455927587-28033-16-git-send-email-eblake@redhat.com> In-Reply-To: <1455927587-28033-1-git-send-email-eblake@redhat.com> References: <1455927587-28033-1-git-send-email-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 20 Feb 2016 00:20:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: armbru@redhat.com Subject: [Qemu-devel] [PATCH 15/17] qapi: Use anonymous base in SchemaInfo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that the generator supports it, we might as well use an anonymous base rather than breaking out a single-use SchemaInfoBase structure. Oddly enough, this change does not affect the resulting introspection output (because we already inline the members of a base type into an object, and had no independent use of the base type reachable from a command). Signed-off-by: Eric Blake --- v1: no change Previously posted as part of qapi cleanup subset F: v6: new patch --- qapi/introspect.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/qapi/introspect.json b/qapi/introspect.json index 9e9369e..3fd81fb 100644 --- a/qapi/introspect.json +++ b/qapi/introspect.json @@ -75,16 +75,6 @@ 'command', 'event' ] } ## -# @SchemaInfoBase -# -# Members common to any @SchemaInfo. -# -# Since: 2.5 -## -{ 'struct': 'SchemaInfoBase', - 'data': { 'name': 'str', 'meta-type': 'SchemaMetaType' } } - -## # @SchemaInfo # # @name: the entity's name, inherited from @base. @@ -103,7 +93,7 @@ # Since: 2.5 ## { 'union': 'SchemaInfo', - 'base': 'SchemaInfoBase', + 'base': { 'name': 'str', 'meta-type': 'SchemaMetaType' }, 'discriminator': 'meta-type', 'data': { 'builtin': 'SchemaInfoBuiltin',