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
This commit is contained in:
Tommi Komulainen 2008-10-17 14:57:38 +00:00 committed by Philip Withnall
parent 477412eeca
commit 80429426af

View File

@ -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\"");