diff options
author | Torsten Schönfeld <kaffeetisch@gmx.de> | 2011-10-02 17:20:45 +0200 |
---|---|---|
committer | Torsten Schönfeld <kaffeetisch@gmx.de> | 2013-02-10 19:40:27 +0100 |
commit | 05f400942d2f3ac9a721bbfad5d58b6aa1d93cc9 (patch) | |
tree | 4aac3236bc99c762ce2885ee0e8febafd2e2fb5a /giscanner/introspectablepass.py | |
parent | e9939eeb1cd0a2626b968fd72387681366ecb61b (diff) | |
download | gobject-introspection-05f400942d2f3ac9a721bbfad5d58b6aa1d93cc9.tar.gz |
scanner: remove backcompat copies more safely
Instead of modifying the namespace while we are iterating over it, which
leads to nodes not being tested, set an 'internal_skipped' property on the
function and read it in the GIR writer.
https://bugzilla.gnome.org/show_bug.cgi?id=660698
Diffstat (limited to 'giscanner/introspectablepass.py')
-rw-r--r-- | giscanner/introspectablepass.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py index b87156a8..460c8200 100644 --- a/giscanner/introspectablepass.py +++ b/giscanner/introspectablepass.py @@ -229,8 +229,8 @@ class IntrospectablePass(object): def _remove_non_reachable_backcompat_copies(self, obj, stack): if obj.skip: return False - if (isinstance(obj, ast.Function) - and not obj.introspectable - and obj.moved_to is not None): - self._namespace.remove(obj) + if (isinstance(obj, ast.Function) and obj.moved_to is not None): + # remove functions that are not introspectable + if not obj.introspectable: + obj.internal_skipped = True return True |