vala r2079 - in trunk: . vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2079 - in trunk: . vapigen
- Date: Fri, 28 Nov 2008 19:55:20 +0000 (UTC)
Author: juergbi
Date: Fri Nov 28 19:55:20 2008
New Revision: 2079
URL: http://svn.gnome.org/viewvc/vala?rev=2079&view=rev
Log:
2008-11-28 JÃrg Billeter <j bitron ch>
* vapigen/valagirparser.vala:
Support construct properties
Modified:
trunk/ChangeLog
trunk/vapigen/valagirparser.vala
Modified: trunk/vapigen/valagirparser.vala
==============================================================================
--- trunk/vapigen/valagirparser.vala (original)
+++ trunk/vapigen/valagirparser.vala Fri Nov 28 19:55:20 2008
@@ -652,12 +652,19 @@
Property parse_property () {
start_element ("property");
string name = string.joinv ("_", reader.get_attribute ("name").split ("-"));
+ string readable = reader.get_attribute ("readable");
+ string writable = reader.get_attribute ("writable");
+ string construct_ = reader.get_attribute ("construct");
next ();
var type = parse_type ();
var prop = new Property (name, type, null, null, get_current_src ());
prop.access = SymbolAccessibility.PUBLIC;
- prop.get_accessor = new PropertyAccessor (true, false, false, null, null);
- prop.set_accessor = new PropertyAccessor (false, true, false, null, null);
+ if (readable != "0") {
+ prop.get_accessor = new PropertyAccessor (true, false, false, null, null);
+ }
+ if (writable == "1" || construct_ == "1") {
+ prop.set_accessor = new PropertyAccessor (false, (writable == "1"), (construct_ == "1"), null, null);
+ }
end_element ("property");
return prop;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]