From 9ca497c7d85336358e856c4410de036cd7169d3a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 3 Sep 2010 19:27:38 -0400 Subject: scanner: Don't clear out ctype on annotation strings if we fail to resolve We don't have an "annotation source" for Type right now; so as a quick hack, stuff it in the ctype but only if we fail to resolve. --- giscanner/transformer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 4cb167cc..f78407a8 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -726,8 +726,9 @@ Note that type resolution may not succeed.""" return self._namespace.type_from_name(typestr) typeval = self.create_type_from_ctype_string(typestr) self.resolve_type(typeval) - # Explicitly clear out the c_type; there isn't one in this case. - typeval.ctype = None + if typeval.resolved: + # Explicitly clear out the c_type; there isn't one in this case. + typeval.ctype = None return typeval def _resolve_type_from_ctype(self, typeval): -- cgit v1.2.1