vala r1787 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1787 - in trunk: . gobject
- Date: Fri, 26 Sep 2008 20:34:10 +0000 (UTC)
Author: juergbi
Date: Fri Sep 26 20:34:10 2008
New Revision: 1787
URL: http://svn.gnome.org/viewvc/vala?rev=1787&view=rev
Log:
2008-09-26 JÃrg Billeter <j bitron ch>
* gobject/valaccodeclassbinding.vala:
Use correct accessor cname for interface implementations of
properties inherited from a base class,
based on patch by Florian Brosch, fixes bug 548895
Modified:
trunk/ChangeLog
trunk/THANKS
trunk/gobject/valaccodeclassbinding.vala
Modified: trunk/THANKS
==============================================================================
--- trunk/THANKS (original)
+++ trunk/THANKS Fri Sep 26 20:34:10 2008
@@ -2,6 +2,7 @@
Abderrahim Kitouni
Alberto Ruiz
+Alexander Bokovoy
Alexandre Moreira
Alexey Lubimov
Ali Sabil
@@ -23,6 +24,7 @@
Emmanuele Bassi
Ãtienne Bersac
Evan Nemerson
+Florian Brosch
Francisco Camenforte Torres
Frederik
Gabriel FalcÃo
Modified: trunk/gobject/valaccodeclassbinding.vala
==============================================================================
--- trunk/gobject/valaccodeclassbinding.vala (original)
+++ trunk/gobject/valaccodeclassbinding.vala Fri Sep 26 20:34:10 2008
@@ -563,9 +563,16 @@
}
if (base_class != null && cl_method.parent_symbol != cl) {
// method inherited from base class
-
+
+ var base_method = cl_method;
+ if (cl_method.base_method != null) {
+ base_method = cl_method.base_method;
+ } else if (cl_method.base_interface_method != null) {
+ base_method = cl_method.base_interface_method;
+ }
+
var ciface = new CCodeIdentifier ("iface");
- init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (ciface, m.vfunc_name), new CCodeIdentifier (cl_method.get_cname ()))));
+ init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (ciface, m.vfunc_name), new CCodeIdentifier (base_method.get_cname ()))));
}
}
}
@@ -611,15 +618,22 @@
}
if (base_class != null && cl_prop.parent_symbol != cl) {
// property inherited from base class
-
+
+ var base_property = cl_prop;
+ if (cl_prop.base_property != null) {
+ base_property = cl_prop.base_property;
+ } else if (cl_prop.base_interface_property != null) {
+ base_property = cl_prop.base_interface_property;
+ }
+
var ciface = new CCodeIdentifier ("iface");
- if (prop.get_accessor != null) {
- string cname = "%s_real_get_%s".printf (cl.get_lower_case_cname (null), prop.name);
+ if (base_property.get_accessor != null) {
+ string cname = base_property.get_accessor.get_cname ();
init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (ciface, "get_%s".printf (prop.name)), new CCodeIdentifier (cname))));
}
- if (prop.set_accessor != null) {
- string cname = "%s_real_set_%s".printf (cl.get_lower_case_cname (null), prop.name);
+ if (base_property.set_accessor != null) {
+ string cname = base_property.set_accessor.get_cname ();
init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (ciface, "set_%s".printf (prop.name)), new CCodeIdentifier (cname))));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]