diff options
author | Shaheed Haque <srhaque@theiet.org> | 2017-01-05 20:27:44 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2017-01-05 20:30:21 +0000 |
commit | 13f66631495e232ae53a0bb683bce323f1a7acb2 (patch) | |
tree | 5933d72bd4dd17102abda18cd8e20c128f66457c /find-modules | |
parent | 738972a9a29a429592fe7e375ff7c550d7c596d5 (diff) | |
download | extra-cmake-modules-13f66631495e232ae53a0bb683bce323f1a7acb2.tar.gz extra-cmake-modules-13f66631495e232ae53a0bb683bce323f1a7acb2.tar.bz2 |
Skip attributes on enums when generating bindings
Diffstat (limited to 'find-modules')
-rw-r--r-- | find-modules/sip_generator.py | 7 |
1 files changed, 5 insertions, 2 deletions
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 |