summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-08-09 17:17:15 -0400
committerColin Walters <walters@verbum.org>2012-08-13 13:32:13 -0400
commit0e13b86146eaa2fd58fc5165b11eb4f8396108fa (patch)
treee6ed53809466af07a32239c5158d65754af5a799 /giscanner/maintransformer.py
parentecef2be0f1b42a2850df35c711a338f15c4d7e4f (diff)
downloadgobject-introspection-0e13b86146eaa2fd58fc5165b11eb4f8396108fa.tar.gz
Revert "Implement "rename to" annotation for records"
This reverts commit 764366f7e4ef5a765a24ffac8c60b811f38b9ad9. It can't work right now because to really use the structures, you need to register them as a boxed, and that means we also need to rename the boxed type. A future version of this patch will need to handle both the structure name and the GType name. https://bugzilla.gnome.org/show_bug.cgi?id=675985
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index eb6b8b38..77a66d21 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -60,14 +60,14 @@ class MainTransformer(object):
# Some initial namespace surgery
self._namespace.walk(self._pass_fixup_hidden_fields)
- # Read in annotations needed early
- self._namespace.walk(self._pass_read_annotations_early)
-
# We have a rough tree which should have most of of the types
# we know about. Let's attempt closure; walk over all of the
# Type() types and see if they match up with something.
self._namespace.walk(self._pass_type_resolution)
+ # Read in annotations needed early
+ self._namespace.walk(self._pass_read_annotations_early)
+
# Determine some default values for transfer etc.
# based on the current tree.
self._namespace.walk(self._pass_callable_defaults)
@@ -139,16 +139,7 @@ usage is void (*_gtk_reserved1)(void);"""
return param.argname
- def _apply_annotation_rename_to_record(self, node, chain, block):
- if not block:
- return
- rename_to = block.get_tag(TAG_RENAME_TO)
- if not rename_to:
- return
-
- node.name = rename_to.value
-
- def _apply_annotation_rename_to_function(self, node, chain, block):
+ def _apply_annotation_rename_to(self, node, chain, block):
if not block:
return
rename_to = block.get_tag(TAG_RENAME_TO)
@@ -186,7 +177,6 @@ usage is void (*_gtk_reserved1)(void);"""
block = self._blocks.get(node.ctype)
else:
block = self._blocks.get(node.c_name)
- self._apply_annotation_rename_to_record(node, chain, block)
self._apply_annotations_annotated(node, block)
return True
@@ -838,7 +828,7 @@ usage is void (*_gtk_reserved1)(void);"""
def _apply_annotations2_function(self, node, chain):
block = self._blocks.get(node.symbol)
- self._apply_annotation_rename_to_function(node, chain, block)
+ self._apply_annotation_rename_to(node, chain, block)
# Handle virtual invokers
parent = chain[-1] if chain else None