[vala] gidlparser: Use lower_case_cprefix when available also for classes



commit d6a032ed5a3fcc5532ac5374a09644af80100f5c
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Aug 3 13:26:22 2011 +0200

    gidlparser: Use lower_case_cprefix when available also for classes

 vapigen/valagidlparser.vala |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 7655d5e..e3d0728 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -264,9 +264,8 @@ public class Vala.GIdlParser : CodeVisitor {
 			return "";
 		}
 		string cprefix;
-		if (sym is Namespace) {
-			cprefix = sym.get_attribute_string ("CCode", "lower_case_cprefix");
-		} else {
+		cprefix = sym.get_attribute_string ("CCode", "lower_case_cprefix");
+		if (cprefix == null && (sym is ObjectTypeSymbol || sym is Struct)) {
 			cprefix = sym.get_attribute_string ("CCode", "cprefix");
 		}
 		if (cprefix != null) {



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