Commit c8abdb70 authored by Didier 'Ptitjes's avatar Didier 'Ptitjes Committed by Jürg Billeter

GIR writer: Improve property generation

Generate readable, construct and construct-only attributes on property.
Signed-off-by: default avatarDidier 'Ptitjes <ptitjes@free.fr>
parent 689b045f
......@@ -562,11 +562,18 @@ public class Vala.GIRWriter : CodeVisitor {
write_indent ();
stream.printf ("<property name=\"%s\"", prop.get_canonical_name ());
if (prop.get_accessor != null) {
stream.printf (" readable=\"1\"");
if (prop.get_accessor == null) {
stream.printf (" readable=\"0\"");
}
if (prop.set_accessor != null) {
stream.printf (" writable=\"1\"");
if (prop.set_accessor.construction) {
if (!prop.set_accessor.writable) {
stream.printf (" construct-only=\"1\"");
} else {
stream.printf (" construct=\"1\"");
}
}
}
stream.printf (">\n");
indent++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment