Blame SOURCES/0001-scanner-dont-barf-on-anonymous-unions.patch

16375d
# This patch is a hand edited backport from upstream since RPM is crap
16375d
# and doesn't understand git.
16375d
16375d
From 305e0bd34a11e06219d1e6a7b7078918d050a4d6 Mon Sep 17 00:00:00 2001
16375d
From: Colin Walters <walters@verbum.org>
16375d
Date: Wed, 30 Oct 2013 15:24:06 +0000
16375d
Subject: [PATCH] scanner: Don't barf on anonymous unions
16375d
16375d
I'd like to be able to use this inside GTK+.
16375d
16375d
See: https://bugzilla.gnome.org/show_bug.cgi?id=711153
16375d
16375d
https://bugzilla.gnome.org/show_bug.cgi?id=711157
16375d
---
16375d
 giscanner/maintransformer.py           |  1 +
16375d
 tests/scanner/Regress-1.0-expected.gir | 20 ++++++++++++++++++++
16375d
 tests/scanner/regress.h                | 12 ++++++++++++
16375d
 3 files changed, 33 insertions(+)
16375d
16375d
--- giscanner/maintransformer.py~	2013-02-19 10:57:45.000000000 -0500
16375d
+++ giscanner/maintransformer.py	2013-10-31 11:18:05.720336577 -0400
16375d
@@ -116,7 +116,8 @@
16375d
         for field in node.fields:
16375d
             if field is None:
16375d
                 continue
16375d
-            if (field.name.startswith('_')
16375d
+            if (field.name is not None
16375d
+                and field.name.startswith('_')
16375d
                 and field.anonymous_node is not None
16375d
                 and isinstance(field.anonymous_node, ast.Callback)):
16375d
                 field.introspectable = False