+2009-02-11 Jürg Billeter <j@bitron.ch>
+
+ * vala/valaenum.vala:
+ * vala/valainterface.vala:
+ * vala/valastruct.vala:
+ * vapigen/valagirparser.vala:
+
+ Recognize c:type attributes in .gir
+
2009-02-10 Ryan Lortie <desrt@desrt.ca>
Bug 571169 – make floating references generic
return cname;
}
+ public void set_cname (string cname) {
+ this.cname = cname;
+ }
+
public override string get_lower_case_cprefix () {
if (lower_case_cprefix == null) {
lower_case_cprefix = "%s_".printf (get_lower_case_cname (null));
/* valainterface.vala
*
- * Copyright (C) 2006-2008 Jürg Billeter
+ * Copyright (C) 2006-2009 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
}
return cname;
}
+
+ public void set_cname (string cname) {
+ this.cname = cname;
+ }
/**
* Returns the string to be prepended to the name of members of this
start_element ("enumeration");
var en = new Enum (reader.get_attribute ("name"), get_current_src ());
en.access = SymbolAccessibility.PUBLIC;
+
+ string enum_cname = reader.get_attribute ("c:type");
+ if (enum_cname != null) {
+ en.set_cname (enum_cname);
+ }
+
next ();
string common_prefix = null;
var cl = new Class (reader.get_attribute ("name"), get_current_src ());
cl.access = SymbolAccessibility.PUBLIC;
+ string cname = reader.get_attribute ("c:type");
+ if (cname != null) {
+ cl.set_cname (cname);
+ }
+
string parent = reader.get_attribute ("parent");
if (parent != null) {
cl.add_base_type (parse_type_from_name (parent));
start_element ("interface");
var iface = new Interface (reader.get_attribute ("name"), get_current_src ());
iface.access = SymbolAccessibility.PUBLIC;
+
+ string cname = reader.get_attribute ("c:type");
+ if (cname != null) {
+ iface.set_cname (cname);
+ }
+
next ();
var methods = new ArrayList<Method> ();
var vmethods = new ArrayList<Method> ();
start_element ("glib:boxed");
var st = new Struct (reader.get_attribute ("glib:name"));
st.access = SymbolAccessibility.PUBLIC;
+
+ string cname = reader.get_attribute ("c:type");
+ if (cname != null) {
+ st.set_cname (cname);
+ }
+
next ();
while (current_token == MarkupTokenType.START_ELEMENT) {