Re: [Vala] canberra.vapi
- From: "Michael 'Mickey' Lauer" <mickey vanille-media de>
- To: vala-list gnome org
- Subject: Re: [Vala] canberra.vapi
- Date: Sat, 11 Jul 2009 15:14:27 +0200
Hi,
just mark them as out parameters, and the destroy() functions are free
functions:
[Compact]
[CCode (cname = "ca_proplist", free_function = "ca_proplist_destroy")]
public class Proplist {
public static int create( out Proplist p );
// public Error destroy(); // not needed anymore
// ...
}
[Compact]
[CCode (cname = "ca_context", free_function = "ca_context_destroy")]
public class Context {
public static Error create( out Context context );
// public Error destroy(); // not needed anymore
// ...
}
Usage:
Canberra.Context c;
Canberra.Context.create (out c);
Thanks, that's slightly better, still I'd love to have a classical constructor
way of creating a context, like:
var c = new Canberra.Context();
Is this impossible without changes in the library itself?
Cheers,
:M:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]