summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-08-18 18:01:21 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-08-18 18:01:21 +0000
commit7e63a6289afb7d9162b47853fdbce63a5ef337db (patch)
treeabfb7a3bbe0abc195a4aec05906db15491e604e6 /giscanner/girparser.py
parent4fd557392dfe9c3ff65e2e600f8801df05a9859c (diff)
Set ctype of enums Improve enum parsing for enums without a GType. Make
2008-08-18 Johan Dahlin <johan@gnome.org> * gir/Makefile.am: * giscanner/girparser.py: Set ctype of enums * giscanner/transformer.py: Improve enum parsing for enums without a GType. Make flags/enum references to other girs work * giscanner/utils.py: Simplify this a bit * tests/scanner/Makefile.am: * tests/scanner/foo-object.h: * tests/scanner/utility-expected.gir: * tests/scanner/utility.h: Add a new test for external enum references svn path=/trunk/; revision=397
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index ef441a9..d326f1b 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -158,13 +158,12 @@ class GIRParser(object):
def _parse_enumeration_bitfield(self, node):
klass = (GLibFlags if node.tag == _corens('bitfield') else GLibEnum)
-
members = []
for member in node.findall(_corens('member')):
members.append(self._parse_member(member))
- obj = klass(node.attrib.get(_corens('name')),
+ obj = klass(node.attrib.get('name'),
node.attrib.get(_glibns('type-name')),
members,
node.attrib.get(_glibns('get-type')))
-
+ obj.ctype = node.attrib.get(_cns('type'))
self._add_node(obj)