diff options
author | Colin Walters <walters@verbum.org> | 2010-09-03 19:27:38 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-03 19:27:38 -0400 |
commit | 9ca497c7d85336358e856c4410de036cd7169d3a (patch) | |
tree | ea2461a3da13c88046e583d8fb57c6d32720c8ab /giscanner | |
parent | 25d7a4dc44e3a9c211ac8f82925063e638c202c6 (diff) |
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.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/transformer.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 4cb167c..f78407a 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): |