From f132cc5dfb232815f5fefc57fcf565cad51ff1dc Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 5 Jan 2011 16:32:44 -0500 Subject: scanner: Fix handling of property transfer * gdumpparser.py was incorrectly passing the ctype for transfer * Property constructor wasn't actually doing anything with passed transfer * Parse transfer-ownership in girparser --- giscanner/girparser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'giscanner/girparser.py') diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 6f6518c3..bcf68bfd 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -415,7 +415,8 @@ class GIRParser(object): return ast.TypeUnknown() return ast.Type(ctype=ctype) elif name in ['GLib.List', 'GLib.SList']: - subchild = self._find_first_child(typenode, map(_corens, ('callback', 'array', 'varargs', 'type'))) + subchild = self._find_first_child(typenode, + map(_corens, ('callback', 'array', 'varargs', 'type'))) if subchild is not None: element_type = self._parse_type(typenode) else: @@ -509,7 +510,8 @@ class GIRParser(object): node.attrib.get('readable') != '0', node.attrib.get('writable') == '1', node.attrib.get('construct') == '1', - node.attrib.get('construct-only') == '1') + node.attrib.get('construct-only') == '1', + node.attrib.get('transfer-ownership')) self._parse_generic_attribs(node, prop) return prop -- cgit v1.2.1