Commit 3776d2d4 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Fix interface properties in GObject classes

2008-10-17  Jürg Billeter  <j@bitron.ch>

	* vala/valainterface.vala:
	* gobject/valaccodetypesymbolbinding.vala:

	Fix interface properties in GObject classes

svn path=/trunk/; revision=1851
parent e70763ef
2008-10-17 Jürg Billeter <j@bitron.ch>
* vala/valainterface.vala:
* gobject/valaccodetypesymbolbinding.vala:
Fix interface properties in GObject classes
2008-10-17 Jürg Billeter <j@bitron.ch>
* gobject/valaccodeclassbinding.vala:
......
......@@ -32,9 +32,8 @@ public abstract class Vala.CCodeTypeSymbolBinding : CCodeBinding {
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 );
......
......@@ -533,4 +533,16 @@ public class Vala.Interface : ObjectTypeSymbol {
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;
}
}
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