summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-12-28 03:16:05 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-04 13:48:27 -0800
commite9e74c102b7e7181d35f5db1c2927dae07ccdb20 (patch)
tree4b4b49ff2691a626a64ab6b97a7f53a0ba7cb450
parent70eb2cf931aa963ba7a5b1b64a0385bf3f8c2811 (diff)
downloadgobject-introspection-e9e74c102b7e7181d35f5db1c2927dae07ccdb20.tar.gz
scanner: Remove typedef namespace cache
Remove the caching of typedefs in Transformer._typedef_ns. This is no longer used due to the added _tag_ns cache which store tags rather than typedefs. Remove adding of callback typdefs to the typedef_ns since these were not being used anyhow. https://bugzilla.gnome.org/show_bug.cgi?id=581525
-rw-r--r--giscanner/transformer.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 3aee5ec6..469723ff 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -109,25 +109,6 @@ class Transformer(object):
node.tag_name not in self._tag_ns:
self._tag_ns[node.tag_name] = node
- # Now look through the namespace for things like
- # typedef struct _Foo Foo;
- # where we've never seen the struct _Foo. Just create
- # an empty structure for these as "disguised"
- # If we do have a class/interface, merge fields
- for typedef, compound in self._typedefs_ns.iteritems():
- ns_compound = self._namespace.get(compound.name)
- if not ns_compound:
- ns_compound = self._namespace.get('_' + compound.name)
- if (not ns_compound and isinstance(compound, (ast.Record, ast.Union))
- and len(compound.fields) == 0):
- disguised = ast.Record(compound.name, typedef, disguised=True)
- self._namespace.append(disguised)
- elif not ns_compound:
- self._namespace.append(compound)
- elif isinstance(ns_compound, (ast.Record, ast.Union)) and len(ns_compound.fields) == 0:
- ns_compound.fields = compound.fields
- self._typedefs_ns = None
-
# Run through the tag namespace looking for structs that have not been
# promoted into the main namespace. In this case we simply promote them
# with their struct tag.
@@ -854,7 +835,6 @@ raise ValueError."""
callback = self._create_callback(symbol)
if not callback:
return None
- self._typedefs_ns[callback.name] = callback
return callback
def _parse_fields(self, symbol, compound):