[vala/0.38] gidlparser: Fix cname format of renamed signals



commit b2a2063ecc715f540f337482d32d0f4464054099
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 18 23:45:09 2017 +0100

    gidlparser: Fix cname format of renamed signals
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731547

 vapigen/valagidlparser.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 86239f4..bb3c4bb 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -3065,7 +3065,7 @@ public class Vala.GIdlParser : CodeVisitor {
                        foreach (string attr in attributes) {
                                var nv = attr.split ("=", 2);
                                if (nv[0] == "name") {
-                                       sig.set_attribute_string ("CCode", "cname", sig.name);
+                                       sig.set_attribute_string ("CCode", "cname", sig.name.replace ("_", 
"-"));
                                        sig.name = eval (nv[1]);
                                } else if (nv[0] == "has_emitter" && eval (nv[1]) == "1") {
                                        sig.set_attribute ("HasEmitter", true);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]