vala r1851 - in trunk: . gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1851 - in trunk: . gobject vala
- Date: Fri, 17 Oct 2008 13:28:49 +0000 (UTC)
Author: juergbi
Date: Fri Oct 17 13:28:49 2008
New Revision: 1851
URL: http://svn.gnome.org/viewvc/vala?rev=1851&view=rev
Log:
2008-10-17 JÃrg Billeter <j bitron ch>
* vala/valainterface.vala:
* gobject/valaccodetypesymbolbinding.vala:
Fix interface properties in GObject classes
Modified:
trunk/ChangeLog
trunk/gobject/valaccodetypesymbolbinding.vala
trunk/vala/valainterface.vala
Modified: trunk/gobject/valaccodetypesymbolbinding.vala
==============================================================================
--- trunk/gobject/valaccodetypesymbolbinding.vala (original)
+++ trunk/gobject/valaccodetypesymbolbinding.vala Fri Oct 17 13:28:49 2008
@@ -32,9 +32,8 @@
if ((prop.property_type.data_type is Class && !(((Class) prop.property_type.data_type).is_compact)) || prop.property_type.data_type is Interface) {
- //if ((prop.property_type.data_type is Class && ((Class) prop.property_type.data_type).is_subtype_of (codegen.gobject_type)) || prop.property_type.data_type is Interface) {
string param_spec_name = prop.property_type.data_type.get_param_spec_function ();
- if ( param_spec_name == null ) {
+ if (param_spec_name == null) {
cspec.call = new CCodeIdentifier ("g_param_spec_pointer");
} else {
cspec.call = new CCodeIdentifier ( param_spec_name );
Modified: trunk/vala/valainterface.vala
==============================================================================
--- trunk/vala/valainterface.vala (original)
+++ trunk/vala/valainterface.vala Fri Oct 17 13:28:49 2008
@@ -533,4 +533,16 @@
public override CodeBinding? create_code_binding (CodeGenerator codegen) {
return codegen.create_interface_binding (this);
}
+
+ public override string? get_param_spec_function () {
+ foreach (DataType prerequisite in prerequisites) {
+ var prereq = prerequisite as ObjectType;
+ var cl = prereq.type_symbol as Class;
+ if (cl != null) {
+ return cl.get_param_spec_function ();
+ }
+ }
+
+ return null;
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]