Handle casing better for constants
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 7 Sep 2010 23:36:58 +0000 (19:36 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Wed, 8 Sep 2010 00:03:59 +0000 (20:03 -0400)
commitda89c092c5bac56524bd2b60c0f261b9fa3b91be
tree323ea9fd72a99b8ec13b514658f3d8987252097f
parentcd0de25d5971a34f49830668337af96b15fed4b4
Handle casing better for constants

Instead of handling constants by lower-casing them, stripping the
lower-case prefix and upper-casing them again, leave them in the
original case and check against upper-cased versions of
namespace.symbol_prefixes.

Wwe detect what version to test against by looking at the first character
of the identifier, so we assume that --symbol-prefix options are always
in lowercase. If that needs to be relaxed, then we'll have to check all
symbols against both sets of prefixes.

Add tests for constants to Regress.h and fix tests/warn/unresolved-type.h
for a warning message that improved with this change.

https://bugzilla.gnome.org/show_bug.cgi?id=629007
giscanner/ast.py
giscanner/scannermain.py
giscanner/transformer.py
tests/scanner/Regress-1.0-expected.gir
tests/scanner/regress.h
tests/warn/unresolved-type.h