diff options
author | Tommi Komulainen <tommi.komulainen@iki.fi> | 2008-10-17 14:57:38 +0000 |
---|---|---|
committer | Tommi Komulainen <tko@src.gnome.org> | 2008-10-17 14:57:38 +0000 |
commit | 2b1b2ccf3e29c26a50bcaac876b16d0c5c2d4df3 (patch) | |
tree | d10c793d4723b6a801018e34b69bbfc1e49aaf65 /tools | |
parent | 52ca4df40a09526d9492c85a1886a8c8e85df3e5 (diff) | |
download | gobject-introspection-2b1b2ccf3e29c26a50bcaac876b16d0c5c2d4df3.tar.gz |
Bug 556732 – generate gir files consistently
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* giscanner/girwriter.py (_write_property): write properties
'construct' attribute if set
* tools/generate.c (write_property_info): write properties
'readable' and 'writable' attributes only if non-default
* tests/object.gir: add writable="0"
* tests/scanner/foo-1.0-expected.gir: add construct="1"
svn path=/trunk/; revision=742
Diffstat (limited to 'tools')
-rw-r--r-- | tools/generate.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/generate.c b/tools/generate.c index 0e286fb9..729583f3 100644 --- a/tools/generate.c +++ b/tools/generate.c @@ -841,16 +841,12 @@ write_property_info (const gchar *namespace, if (deprecated) xml_printf (file, " deprecated=\"1\""); - - if (flags & G_PARAM_READABLE) - xml_printf (file, " readable=\"1\""); - else - xml_printf (file, " readable=\"0\""); + /* Properties are assumed to be read-only (see also girwriter.py) */ + if (!(flags & G_PARAM_READABLE)) + xml_printf (file, " readable=\"0\""); if (flags & G_PARAM_WRITABLE) xml_printf (file, " writable=\"1\""); - else - xml_printf (file, " writable=\"0\""); if (flags & G_PARAM_CONSTRUCT) xml_printf (file, " construct=\"1\""); |