Always add a zero-terminated attribute when it cannot be implied
authorGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 1 Jun 2011 14:59:17 +0000 (16:59 +0200)
committerColin Walters <walters@verbum.org>
Sat, 4 Jun 2011 19:15:12 +0000 (15:15 -0400)
commit3e0292cd66752489d5b05bed57abffec0315b3ae
tree3b0c9e2cb1f8dde640e0525b2f6ad588000fe9c3
parent7c93dc9534a4de5599f574043dcb688b8443ebad
Always add a zero-terminated attribute when it cannot be implied

g-ir-compiler assumes that an array is zero terminated when the
attribute is absent and there is no other attribute (length and
fixed-size), but g-ir-scanner only added the attribute when it is 0.
This means that an explicit zero-terminated=1 annotation would have
had no effect.
Fix that and at the same time ensure that all other arrays are not
zero-terminated by default.

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