2008-06-12 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala:
Use `const' in C for immutable classes where appropriate
svn path=/trunk/; revision=1573
2008-06-12 Jürg Billeter <j@bitron.ch>
+ * vala/valaclass.vala:
+
+ Use `const' in C for immutable classes where appropriate
+
+2008-06-12 Jürg Billeter <j@bitron.ch>
+
* vala/valainterfacewriter.vala:
* vapigen/valagidlparser.vala:
}
public override string get_cname (bool const_type = false) {
- if (const_type && const_cname != null) {
- return const_cname;
+ if (const_type) {
+ if (const_cname != null) {
+ return const_cname;
+ } else if (is_immutable) {
+ return "const " + get_cname (false);
+ }
}
if (cname == null) {