Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/giscanner/glibtransformer.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-02-20 22:34:20 (GMT)
committer Colin Walters <walters@verbum.org>2009-02-25 22:31:49 (GMT)
commit251de52b083d3e0e42f25cb164a46865c2c2b9a9 (patch)
tree99db442fd1bb299466f5d277561becfca4b220ee /giscanner/glibtransformer.py
parent0b9dda0e725446882dca84b6a64688c8f0e5a4e3 (diff)
Bug 572434 - Associate interfaces with their C structures
Similar to GObject class structs, we pair up GInterfaces with their C structures. Also, move some GLib-specific things into glibast.py, and make the naming more generic.
Diffstat (limited to 'giscanner/glibtransformer.py')
-rw-r--r--giscanner/glibtransformer.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py
index e5dd3a1..5a7a96d 100644
--- a/giscanner/glibtransformer.py
+++ b/giscanner/glibtransformer.py
@@ -32,7 +32,7 @@ from .ast import (Alias, Bitfield, Callback, Constant, Enum, Function, Member,
from .transformer import Names
from .glibast import (GLibBoxed, GLibEnum, GLibEnumMember, GLibFlags,
GLibInterface, GLibObject, GLibSignal, GLibBoxedStruct,
- GLibBoxedUnion, GLibBoxedOther, type_names)
+ GLibBoxedUnion, GLibBoxedOther, GLibRecord, type_names)
from .utils import to_underscores, to_underscores_noprefix
default_array_types['guchar*'] = TYPE_UINT8
@@ -573,13 +573,15 @@ class GLibTransformer(object):
for field in maybe_class.fields:
if isinstance(field, Field):
field.writable = False
+ # TODO: remove this, we should be computing vfuncs instead
if isinstance(pair_class, GLibInterface):
for field in maybe_class.fields[1:]:
pair_class.fields.append(field)
- return
- elif isinstance(pair_class, GLibObject):
- pair_class.class_struct = class_struct
- class_struct.is_gobject_struct_for = name
+ gclass_struct = GLibRecord.from_record(class_struct)
+ self._remove_attribute(class_struct.name)
+ self._add_attribute(gclass_struct, True)
+ pair_class.glib_type_struct = gclass_struct
+ gclass_struct.is_gtype_struct_for = name
# Introspection