scanner: Don't try to copy c:type if we're parsing (element-type)
authorColin Walters <walters@verbum.org>
Tue, 30 Aug 2011 02:17:02 +0000 (22:17 -0400)
committerColin Walters <walters@verbum.org>
Tue, 30 Aug 2011 02:17:02 +0000 (22:17 -0400)
commitcef390f65ffe9e51b103fcb29ee177882f762a0e
tree930904227ee8c35adf28300195f5567859b5e65b
parent198bbaf8589dc2106a92050e74ad643a9411d047
scanner: Don't try to copy c:type if we're parsing (element-type)

Commit 81abc2eb63317003a11d1484e84698a37e8ec035 tries harder to keep
the c:type if it was overriden by a (type) annotation.  However, the
_resolve() function was also called for (element-type), which had
undesirable effects - we'd copy the container c:type to the element
type.

Fix this by splitting out the c:type preservation to only happen when
processing toplevel types.

https://bugzilla.gnome.org/show_bug.cgi?id=656931
giscanner/maintransformer.py
tests/scanner/Annotation-1.0-expected.gir
tests/scanner/Foo-1.0-expected.gir
tests/scanner/Regress-1.0-expected.gir