summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-10-20 17:04:17 +0000
committerColin Walters <walters@src.gnome.org>2008-10-20 17:04:17 +0000
commitad982938b3dfdc5a5df7c18ec49116e3b6bdce1a (patch)
treeb58d85b68be8dec773a779982e6af1793476ad94 /giscanner/girparser.py
parentf20b1189e8ce6731db8ca07f890a457afab0f920 (diff)
downloadgobject-introspection-ad982938b3dfdc5a5df7c18ec49116e3b6bdce1a.tar.gz
Bug 557011 - Add g_object_info_get_abstract
svn path=/trunk/; revision=757
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index bda43e7d..95ee4d01 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -123,18 +123,23 @@ class GIRParser(object):
node.attrib.get(_cns('type')))
def _parse_object_interface(self, node):
+ ctor_args = [node.attrib['name'],
+ node.attrib.get('parent'),
+ node.attrib[_glibns('type-name')],
+ node.attrib[_glibns('get-type')]]
if node.tag == _corens('interface'):
klass = GLibInterface
elif node.tag == _corens('class'):
klass = GLibObject
+ is_abstract = node.attrib.get('abstract')
+ is_abstract = is_abstract and is_abstract != '0'
+ ctor_args.append(is_abstract)
else:
raise AssertionError(node)
- obj = klass(node.attrib['name'],
- node.attrib.get('parent'),
- node.attrib[_glibns('type-name')],
- node.attrib[_glibns('get-type')],
- node.attrib.get(_cns('type')))
+ ctor_args.append(node.attrib.get(_cns('type')))
+ obj = klass(*ctor_args)
+
for iface in node.findall(_corens('implements')):
obj.interfaces.append(iface.attrib['name'])
for method in node.findall(_corens('method')):