diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-06-12 15:40:01 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-14 20:11:04 +0100 |
commit | d5492573980ab26249c6544fd17542004dd73a2f (patch) | |
tree | de02cc6d908211dbda39ec6448a482e26cb92e3e /codegen/valaccodeattribute.vala | |
parent | a336d75586acb534aff55ca86425eb8f3aa45de4 (diff) | |
download | vala-d5492573980ab26249c6544fd17542004dd73a2f.tar.gz |
codegen: Fix get_ccode_name() for properties
Handle them the same way as signals and hold the canonical representation
as ccode name.
Diffstat (limited to 'codegen/valaccodeattribute.vala')
-rw-r--r-- | codegen/valaccodeattribute.vala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/codegen/valaccodeattribute.vala b/codegen/valaccodeattribute.vala index 3740d232a..0b89230e8 100644 --- a/codegen/valaccodeattribute.vala +++ b/codegen/valaccodeattribute.vala @@ -692,6 +692,8 @@ public class Vala.CCodeAttribute : AttributeCache { } else { return "%s%s".printf (get_ccode_lower_case_prefix (sym.parent_symbol), sym.name); } + } else if (sym is Property) { + return sym.name.replace ("_", "-"); } else if (sym is PropertyAccessor) { unowned PropertyAccessor acc = (PropertyAccessor) sym; var t = (TypeSymbol) acc.prop.parent_symbol; |