summaryrefslogtreecommitdiff
path: root/giscanner/girwriter.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-06-12 18:08:56 -0300
committerJohan Dahlin <johan@gnome.org>2010-07-09 10:15:45 -0300
commit1e9822c7817062a9b853269b9418fd78782090b5 (patch)
tree684a6bc8520db45c9d126d954d7b82921cb2a753 /giscanner/girwriter.py
parent017727630d09a854b1c1a4767066fb675b139de9 (diff)
downloadgobject-introspection-1e9822c7817062a9b853269b9418fd78782090b5.tar.gz
Add support for non-GObject fundamental objects
This patch adds support for instantiable fundamental object types, which are not GObject based. This is mostly interesting for being able to support GstMiniObject's which are extensivly used in GStreamer. Includes a big test case to the Everything module (inspired by GstMiniObject) which should be used by language bindings who wishes to test this functionallity. This patch increases the size of the typelib and breaks compatibility with older typelibs. https://bugzilla.gnome.org/show_bug.cgi?id=568913
Diffstat (limited to 'giscanner/girwriter.py')
-rw-r--r--giscanner/girwriter.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index 5e29d067..2e0a6cdc 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -348,6 +348,17 @@ and/or use gtk-doc annotations. ''')
attrs.append(('glib:get-type', node.get_type))
if node.glib_type_struct:
attrs.append(('glib:type-struct', node.glib_type_struct.name))
+ if isinstance(node, GLibObject):
+ if node.fundamental:
+ attrs.append(('glib:fundamental', '1'))
+ if node.ref_func:
+ attrs.append(('glib:ref-func', node.ref_func))
+ if node.unref_func:
+ attrs.append(('glib:unref-func', node.unref_func))
+ if node.set_value_func:
+ attrs.append(('glib:set-value-func', node.set_value_func))
+ if node.get_value_func:
+ attrs.append(('glib:get-value-func', node.get_value_func))
with self.tagcontext(tag_name, attrs):
self._write_generic(node)
if isinstance(node, GLibObject):