Commit 43b536ac authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

use g_value_set_object for interfaces implement get_type_id

2006-11-06  Jürg Billeter  <j@bitron.ch>

	* vala/valacodegenerator.vala: use g_value_set_object for interfaces
	* vala/valainterface.vala: implement get_type_id

svn path=/trunk/; revision=168
parent 1ff1d7a8
2006-11-06 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: use g_value_set_object for interfaces
* vala/valainterface.vala: implement get_type_id
2006-11-02 Jürg Billeter <j@bitron.ch>
* configure.ac: Post-release version bump
......
......@@ -707,7 +707,7 @@ public class Vala.CodeGenerator : CodeVisitor {
}
private ref CCodeIdentifier! get_value_setter_function (TypeReference! type_reference) {
if (type_reference.data_type is Class) {
if (type_reference.data_type is Class || type_reference.data_type is Interface) {
return new CCodeIdentifier ("g_value_set_object");
} else if (type_reference.data_type == string_type.data_type) {
return new CCodeIdentifier ("g_value_set_string");
......
......@@ -37,6 +37,7 @@ public class Vala.Interface : DataType {
private string cname;
private string lower_case_csuffix;
private string type_cname;
private string type_id;
/**
* Creates a new interface.
......@@ -276,4 +277,12 @@ public class Vala.Interface : DataType {
public void set_type_cname (string! type_cname) {
this.type_cname = type_cname;
}
public override string get_type_id () {
if (type_id == null) {
type_id = get_upper_case_cname ("TYPE_");
}
return type_id;
}
}
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