From: Ian Jackson Subject: [PATCH 05/18] libxl: idl: Provide struct and union tags Date: Fri, 9 Dec 2011 18:54:24 +0000 Message-ID: <1323456877-15315-6-git-send-email-ian.jackson@eu.citrix.com> References: <1323456877-15315-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1323456877-15315-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org Instead of generating: typedef struct { ... } libxl_foo; Produce: typedef struct libxl_foo { ... } libxl_foo; This makes it possible to refer to libxl idl-generated structs and unions, as incomplete types, before they have been defined. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/gentypes.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py index d8f43e3..7ca6375 100644 --- a/tools/libxl/gentypes.py +++ b/tools/libxl/gentypes.py @@ -56,7 +56,7 @@ def libxl_C_type_define(ty, indent = ""): if ty.typename is None: s += "%s {\n" % ty.kind else: - s += "typedef %s {\n" % ty.kind + s += "typedef %s %s {\n" % (ty.kind, ty.typename) for f in ty.fields: if f.comment is not None: -- 1.7.2.5