Re: [Vala] Is there an Any type in vala?



On Sun, 2008-05-11 at 03:39 -0400, Yu Feng wrote:
The need for an 'Any' type emerges in the following context:


Object o = new Object();
Object o1 = new Object();
string s = "string"
o.set_data("data", o1);
o.set_data("string", s);

set_data is currently declared as 
set_data(string, void *);

We should bind g_object_set_data as a generic method

[CCode (cname = "g_object_set_data_full")]
public void set_data<G> (string key, G# data);

However, we don't support generic methods in Vala, yet.

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]