diff options
author | Colin Walters <walters@verbum.org> | 2009-02-20 22:34:20 (GMT) |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-02-25 22:31:49 (GMT) |
commit | 251de52b083d3e0e42f25cb164a46865c2c2b9a9 (patch) | |
tree | 99db442fd1bb299466f5d277561becfca4b220ee /giscanner/girwriter.py | |
parent | 0b9dda0e725446882dca84b6a64688c8f0e5a4e3 (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/girwriter.py')
-rw-r--r-- | giscanner/girwriter.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index 4742840..df52709 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -1,6 +1,7 @@ # -*- Mode: Python -*- # GObject-Introspection - a framework for introspecting GObject libraries # Copyright (C) 2008 Johan Dahlin +# Copyright (C) 2008, 2009 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -27,7 +28,8 @@ from .ast import (Alias, Array, Bitfield, Callback, Class, Constant, Enum, Function, Interface, List, Map, Member, Struct, Union, Varargs) from .glibast import (GLibBoxed, GLibEnum, GLibEnumMember, - GLibFlags, GLibObject, GLibInterface) + GLibFlags, GLibObject, GLibInterface, + GLibRecord) from .xmlwriter import XMLWriter @@ -330,9 +332,8 @@ and/or use gtk-doc annotations. ''') attrs.append(('glib:type-name', node.type_name)) if node.get_type: attrs.append(('glib:get-type', node.get_type)) - if isinstance(node, GLibObject): - if node.class_struct: - attrs.append(('glib:class-struct', node.class_struct.name)) + if node.glib_type_struct: + attrs.append(('glib:type-struct', node.glib_type_struct.name)) with self.tagcontext(tag_name, attrs): if isinstance(node, GLibObject): for iface in node.interfaces: @@ -408,9 +409,10 @@ and/or use gtk-doc annotations. ''') attrs.append(('c:type', record.symbol)) if record.disguised: attrs.append(('disguised', '1')) - if record.is_gobject_struct_for: - attrs.append(('glib:is-class-struct-for', - record.is_gobject_struct_for)) + if isinstance(record, GLibRecord): + if record.is_gtype_struct_for: + attrs.append(('glib:is-gtype-struct-for', + record.is_gtype_struct_for)) if record.doc: attrs.append(('doc', record.doc)) self._append_version(record, attrs) |