summaryrefslogtreecommitdiff
path: root/giscanner/gdumpparser.py
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2011-06-03 19:10:42 -0400
committerColin Walters <walters@verbum.org>2011-06-04 13:48:42 -0400
commit7c93dc9534a4de5599f574043dcb688b8443ebad (patch)
tree6d3f65f23e666d76d2e32026361620df00337ff8 /giscanner/gdumpparser.py
parent6e1158f62b0b2f50603d018ebeff6d2c75dd5f98 (diff)
downloadgobject-introspection-7c93dc9534a4de5599f574043dcb688b8443ebad.tar.gz
Add boxed types definition for GLib
Use the new glib-boxed.h header from gobject to pair structure definitions with boxed types in the GLib namespace, improving the introspection coverage and removing some hacks. Some fixes from Colin Walters <walters@verbum.org> https://bugzilla.gnome.org/show_bug.cgi?id=646635
Diffstat (limited to 'giscanner/gdumpparser.py')
-rw-r--r--giscanner/gdumpparser.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
index 7e8f31f5..650e1948 100644
--- a/giscanner/gdumpparser.py
+++ b/giscanner/gdumpparser.py
@@ -133,14 +133,6 @@ class GDumpParser(object):
for node in to_remove:
self._namespace.remove(node)
- if self._namespace.name == 'GLib':
- variant = self._namespace.get('Variant')
- assert variant is not None
- variant.add_gtype('GVariant', 'g_variant_get_gtype')
- variant.c_symbol_prefix = 'variant'
- # Work around scanner bug
- variant.disguised = False
-
# Helper functions
def _execute_binary_get_tree(self):
@@ -209,9 +201,6 @@ blob containing data gleaned from GObject's primitive introspection."""
self._initparse_get_type_function(func)
def _initparse_get_type_function(self, func):
- if self._namespace.name == 'GLib':
- # No GObjects in GLib
- return False
if (self._namespace.name == 'GObject' and
func.symbol in ('g_object_get_type', 'g_initially_unowned_get_type')):
# We handle these internally, see _create_gobject
@@ -455,14 +444,13 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
node.parent_chain = parent_types
def _introspect_fundamental(self, xmlnode):
- # We only care about types that can be instantiatable, other
- # fundamental types such as the Clutter.Fixed/CoglFixed registers
- # are not yet interesting from an introspection perspective and
- # are ignored
- if not xmlnode.attrib.get('instantiatable', False):
+ type_name = xmlnode.attrib['name']
+ if type_name == 'GVariant':
+ # HACK: make GVariant a boxed to avoid looking up GInitiallyUnowned
+ # when computing the default transfer ownership
+ self._introspect_boxed(xmlnode)
return
- type_name = xmlnode.attrib['name']
is_abstract = bool(xmlnode.attrib.get('abstract', False))
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try: