summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2008-11-10 23:58:49 +0000
committerOwen Taylor <otaylor@src.gnome.org>2008-11-10 23:58:49 +0000
commiteceeb044de0a3dd137fa15da7027ce706504bc94 (patch)
tree6585b29a4838c8456799bdf45eacc3f66def26c6 /giscanner/girparser.py
parent5229e674abb42c35c3ae5a548ce3a6e66215c1aa (diff)
downloadgobject-introspection-eceeb044de0a3dd137fa15da7027ce706504bc94.tar.gz
Bug 560248 – "disguised structures"
Certain types like GIConv and GdkAtom are pointers internally but don't look like pointers when referenced. They have the form. typedef struct _X *X; Parse these as structures/records but mark them in the gir with a 'disguised' attribute so that we know that they need special handling. In the typelib treat them like any other structure. svn path=/trunk/; revision=872
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index 2a6f0770..02c78b97 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -212,8 +212,10 @@ class GIRParser(object):
node.attrib[_glibns('get-type')],
node.attrib.get(_cns('type')))
else:
+ disguised = node.attrib.get('disguised') == '1'
struct = Struct(node.attrib['name'],
- node.attrib.get(_cns('type')))
+ node.attrib.get(_cns('type')),
+ disguised=disguised)
self._add_node(struct)
if self._include_parsing: