From 13f66631495e232ae53a0bb683bce323f1a7acb2 Mon Sep 17 00:00:00 2001 From: Shaheed Haque Date: Thu, 5 Jan 2017 20:27:44 +0000 Subject: Skip attributes on enums when generating bindings --- find-modules/sip_generator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'find-modules/sip_generator.py') diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py index 10be1477..e3101fb1 100644 --- a/find-modules/sip_generator.py +++ b/find-modules/sip_generator.py @@ -344,8 +344,11 @@ class SipGenerator(object): decl = pad + "enum {} {{\n".format(enum.displayname) enumerations = [] for enum in enum.get_children(): - enumerations.append(pad + " {}".format(enum.displayname)) - assert enum.kind == CursorKind.ENUM_CONSTANT_DECL + # + # Skip visibility attributes and the like. + # + if enum.kind == CursorKind.ENUM_CONSTANT_DECL: + enumerations.append(pad + " {}".format(enum.displayname)) decl += ",\n".join(enumerations) + "\n" decl += pad + "}" return decl -- cgit v1.2.1