summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-04-28 22:57:00 -0700
committerThomas A Caswell <tcaswell@gmail.com>2015-09-29 14:44:50 -0400
commite09c0a2bca45016daee064669ef5b1c9a748a566 (patch)
tree567ce836ed738a0a8161c11602cb135c2a77375e /giscanner/maintransformer.py
parentd9a9f70ef6e3b1ef0f4baccf94780d286e51bbb0 (diff)
downloadgobject-introspection-e09c0a2bca45016daee064669ef5b1c9a748a566.tar.gz
giscanner: Use items() instead of iteritems()
Replace usage of iteritems() and itervalues() with items() and values() respectively. https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 2871abac..f2949822 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -74,14 +74,14 @@ class MainTransformer(object):
self._namespace.walk(self._pass_type_resolution)
# Generate a reverse mapping "bar_baz" -> BarBaz
- for node in self._namespace.itervalues():
+ for node in self._namespace.values():
if isinstance(node, ast.Registered) and node.get_type is not None:
self._uscore_type_names[node.c_symbol_prefix] = node
elif isinstance(node, (ast.Record, ast.Union)):
uscored = to_underscores_noprefix(node.name).lower()
self._uscore_type_names[uscored] = node
- for node in list(self._namespace.itervalues()):
+ for node in list(self._namespace.values()):
if isinstance(node, ast.Function):
# Discover which toplevel functions are actually methods
self._pair_function(node)
@@ -980,14 +980,14 @@ the ones that failed to resolve removed."""
# but only covers enums that are registered as GObject enums.
# Create a fallback mapping based on all known enums in this module.
uscore_enums = {}
- for enum in self._namespace.itervalues():
+ for enum in self._namespace.values():
if not isinstance(enum, ast.Enum):
continue
uscored = to_underscores_noprefix(enum.name).lower()
uscore_enums[uscored] = enum
uscore_enums[enum.name] = enum
- for node in self._namespace.itervalues():
+ for node in self._namespace.values():
if not isinstance(node, ast.ErrorQuarkFunction):
continue
full = node.symbol[:-len('_quark')]