Commit 84c9b65d authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Support 'cheader_filename' attribute for fields and methods, fixes bug

2008-06-04  Jürg Billeter  <j@bitron.ch>

	* vapigen/valagidlparser.vala:

	Support 'cheader_filename' attribute for fields and methods,
	fixes bug 533634

svn path=/trunk/; revision=1562
parent d79c1ba6
2008-06-04 Jürg Billeter <j@bitron.ch>
* vapigen/valagidlparser.vala:
Support 'cheader_filename' attribute for fields and methods,
fixes bug 533634
2008-06-04 Jürg Billeter <j@bitron.ch>
* gobject/valaccodeclassbinding.vala:
......
......@@ -1312,6 +1312,8 @@ public class Vala.GIdlParser : CodeVisitor {
arg_type.value_owned = true;
return_type.add_type_argument (arg_type);
}
} else if (nv[0] == "cheader_filename") {
m.add_cheader_filename (eval (nv[1]));
}
}
}
......@@ -1633,6 +1635,8 @@ public class Vala.GIdlParser : CodeVisitor {
return null;
}
string cheader_filename = null;
var attributes = get_attributes ("%s.%s".printf (current_data_type.get_cname (), node.name));
if (attributes != null) {
foreach (string attr in attributes) {
......@@ -1660,6 +1664,8 @@ public class Vala.GIdlParser : CodeVisitor {
arg_type.value_owned = true;
type.add_type_argument (arg_type);
}
} else if (nv[0] == "cheader_filename") {
cheader_filename = eval (nv[1]);
}
}
}
......@@ -1685,6 +1691,10 @@ public class Vala.GIdlParser : CodeVisitor {
field.set_cname (node.name);
}
if (cheader_filename != null) {
field.add_cheader_filename (cheader_filename);
}
field.no_array_length = true;
return field;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment