diff options
author | Colin Walters <walters@verbum.org> | 2010-09-08 09:58:32 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-08 09:58:32 -0400 |
commit | 5ee812f5553e0786bf8daeedeb956a9074eedb4c (patch) | |
tree | 4b0a652434055333954c0af89f4a7f7ce806650c /giscanner | |
parent | aa94e0736dda492f84e06794cfd009feb6178be8 (diff) |
scanner: Don't attempt to pair methods/constructors with foreign namespaces
See test case, hit in practice in gnome-shell.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/maintransformer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 5493fcd..59f93e2 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -775,6 +775,8 @@ method or constructor of some type.""" ast.Record, ast.Union, glibast.GLibBoxedOther)): return False + if target.namespace != self._namespace: + return False # A quick hack here...in the future we should catch C signature/GI signature # mismatches in a general way in finaltransformer @@ -829,6 +831,8 @@ method or constructor of some type.""" (origin_node, funcname) = split if not isinstance(origin_node, (ast.Class, glibast.GLibBoxed)): return False + if origin_node.namespace != self._namespace: + return False if isinstance(target, ast.Class): parent = origin_node while parent and (not parent.create_type().target_giname == 'GObject.Object'): |