From patchwork Mon Sep 7 10:16:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 515100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id D455C14018C for ; Mon, 7 Sep 2015 21:56:23 +1000 (AEST) Received: from localhost ([::1]:55449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYtVk-0002O0-NT for incoming@patchwork.ozlabs.org; Mon, 07 Sep 2015 06:18:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYtTo-0001Tz-Ot for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:16:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYtTo-0000Pc-0V for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:16:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYtTn-0000PF-SF for qemu-devel@nongnu.org; Mon, 07 Sep 2015 06:16:51 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6D3722D8B7D; Mon, 7 Sep 2015 10:16:51 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t87AGlBZ031709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 7 Sep 2015 06:16:50 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 73EF63011F86; Mon, 7 Sep 2015 12:16:44 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 7 Sep 2015 12:16:20 +0200 Message-Id: <1441621003-2434-10-git-send-email-armbru@redhat.com> In-Reply-To: <1441621003-2434-1-git-send-email-armbru@redhat.com> References: <1441621003-2434-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: mdroth@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH RFC v5 09/32] Revert "qapi: Split up some typedefs to ease review" 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit 6542034f356ebc6f2818c1c6b8c9a143f817bb2a. Signed-off-by: Markus Armbruster --- scripts/qapi-types.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 124a788..d162ca2 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -15,15 +15,13 @@ from qapi import * def generate_fwd_builtin(name): return mcgen(''' -typedef struct %(name)sList %(name)sList; - -struct %(name)sList { +typedef struct %(name)sList { union { %(type)s value; uint64_t padding; }; struct %(name)sList *next; -}; +} %(name)sList; ''', type=c_type(name), name=name) @@ -33,30 +31,26 @@ def generate_fwd_struct(name): typedef struct %(name)s %(name)s; -typedef struct %(name)sList %(name)sList; - -struct %(name)sList { +typedef struct %(name)sList { union { %(name)s *value; uint64_t padding; }; struct %(name)sList *next; -}; +} %(name)sList; ''', name=c_name(name)) def generate_fwd_enum_struct(name): return mcgen(''' -typedef struct %(name)sList %(name)sList; - -struct %(name)sList { +typedef struct %(name)sList { union { %(name)s value; uint64_t padding; }; struct %(name)sList *next; -}; +} %(name)sList; ''', name=c_name(name))