summaryrefslogtreecommitdiff
path: root/vala/valapropertyaccessor.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valapropertyaccessor.vala')
-rw-r--r--vala/valapropertyaccessor.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala
index 393284301..979239d2e 100644
--- a/vala/valapropertyaccessor.vala
+++ b/vala/valapropertyaccessor.vala
@@ -122,6 +122,12 @@ public class Vala.PropertyAccessor : Subroutine {
Method? m = null;
if (readable) {
m = new Method ("get_%s".printf (prop.name), value_type, source_reference, comment);
+
+ // Inherit important attributes
+ m.copy_attribute_bool (prop, "CCode", "array_length");
+ m.copy_attribute_string (prop, "CCode", "array_length_type");
+ m.copy_attribute_bool (prop, "CCode", "array_null_terminated");
+ m.copy_attribute_bool (prop, "CCode", "delegate_target");
} else if (writable) {
m = new Method ("set_%s".printf (prop.name), new VoidType(), source_reference, comment);
m.add_parameter (value_parameter.copy ());
@@ -162,6 +168,7 @@ public class Vala.PropertyAccessor : Subroutine {
value_parameter = new Parameter ("value", value_type, source_reference);
// Inherit important attributes
value_parameter.copy_attribute_bool (prop, "CCode", "array_length");
+ value_parameter.copy_attribute_string (prop, "CCode", "array_length_type");
value_parameter.copy_attribute_bool (prop, "CCode", "array_null_terminated");
value_parameter.copy_attribute_bool (prop, "CCode", "delegate_target");
}