summaryrefslogtreecommitdiff
path: root/giscanner/glibast.py
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-09-13 00:12:34 +0000
committerColin Walters <walters@src.gnome.org>2008-09-13 00:12:34 +0000
commitbd198cca7e55ef8308a154ef005ea3b10c56af7f (patch)
tree003e58521a666eb8cd98a27dd35bc93c767a11ca /giscanner/glibast.py
parenta7e15d415dbfe2734fc4aca57b2c327b0b813f59 (diff)
downloadgobject-introspection-bd198cca7e55ef8308a154ef005ea3b10c56af7f.tar.gz
Parse c:type for boxed records/unions; try resolving types using the GType names.
* giscanner/girparser.py: Parse c:type for boxed records/unions. * giscanner/glibast.py: Avoid overwriting ctype. * giscsanner/transformer.py: Try resolving types using the GType names. svn path=/trunk/; revision=594
Diffstat (limited to 'giscanner/glibast.py')
-rw-r--r--giscanner/glibast.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/giscanner/glibast.py b/giscanner/glibast.py
index 5de98c52..f5df4396 100644
--- a/giscanner/glibast.py
+++ b/giscanner/glibast.py
@@ -97,22 +97,20 @@ class GLibBoxed:
self.constructors = []
self.methods = []
self.type_name = type_name
- self.symbol = type_name
- self.ctype = type_name
self.get_type = get_type
class GLibBoxedStruct(Struct, GLibBoxed):
- def __init__(self, name, type_name, get_type):
- Struct.__init__(self, name, name)
+ def __init__(self, name, type_name, get_type, ctype=None):
+ Struct.__init__(self, name, ctype or type_name)
GLibBoxed.__init__(self, type_name, get_type)
class GLibBoxedUnion(Union, GLibBoxed):
- def __init__(self, name, type_name, get_type):
- Union.__init__(self, name, name)
+ def __init__(self, name, type_name, get_type, ctype=None):
+ Union.__init__(self, name, ctype or type_name)
GLibBoxed.__init__(self, type_name, get_type)
@@ -121,6 +119,7 @@ class GLibBoxedOther(Node, GLibBoxed):
def __init__(self, name, type_name, get_type):
Node.__init__(self, name)
GLibBoxed.__init__(self, type_name, get_type)
+ self.ctype = type_name
class GLibInterface(Interface):