diff options
author | Evan Nemerson <evan@coeus-group.com> | 2012-09-15 16:20:34 -0700 |
---|---|---|
committer | Evan Nemerson <evan@coeus-group.com> | 2012-09-15 16:27:50 -0700 |
commit | 4fa204614f725ba60513cb74eb7fbca05b3f2edd (patch) | |
tree | be164b2a9b3a3a37b21c75c4b3b7a30b0780f83e /vala | |
parent | a250b4631902f3fdc97aa50187bf2b3639a1b1a8 (diff) | |
download | vala-4fa204614f725ba60513cb74eb7fbca05b3f2edd.tar.gz |
girparser: add cname for constructors not prefixed with new_
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valagirparser.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 86780079e..0a9088606 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -2795,6 +2795,10 @@ public class Vala.GirParser : CodeVisitor { var m = new CreationMethod (null, name, current.source_reference); m.has_construct_function = false; + if (name != null && !current.name.has_prefix ("new_")) { + m.set_attribute_string ("CCode", "cname", current.girdata["c:identifier"]); + } + string parent_ctype = null; if (current.parent.symbol is Class) { parent_ctype = current.parent.get_cname (); |