From: Stef Walter Date: Tue, 23 Oct 2012 19:38:48 +0000 (+0200) Subject: giscanner: Don't prefer identifier prefixes over namespaces in deps X-Git-Tag: GOBJECT_INTROSPECTION_1_35_2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=451488516e3526e905f1ceb127e89321db91b3ef;p=platform%2Fupstream%2Fgobject-introspection.git giscanner: Don't prefer identifier prefixes over namespaces in deps Use namespaces in dependencies before falling back to the deprecated --identifier-prefix prefixes. --- diff --git a/giscanner/transformer.py b/giscanner/transformer.py index dfd25507..b96e1417 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -154,7 +154,8 @@ namespaces.""" (ns, giname) = name.split('.', 1) if ns == self._namespace.name: return self._namespace.get(giname) - if ns in self._namespace.identifier_prefixes: + # Fallback to the main namespace if not a dependency and matches a prefix + if ns in self._namespace.identifier_prefixes and not ns in self._includes: message.warn(("Deprecated reference to identifier " + "prefix %s in GIName %s") % (ns, name)) return self._namespace.get(giname)