Re: [Vala] Binding questions
- From: Frederik <scumm_fredo gmx net>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Binding questions
- Date: Tue, 17 Feb 2009 11:18:52 +0100
Michael B. Trausch wrote:
I actually have an example of this that I ran into today... for
libuuid. It seems to inject too many parameters. When I declare:
[CCode(lower_case_cprefix="uuid_")]
public static void generate(out char[16] new_uuid);
I call this in Vala like so:
char[16] uuid;
LibUUID.generate(out uuid);
When called, Vala writes:
gint uuid_length1;
gchar *uuid;
uuid_generate(&uuid, &uuid_length1);
This should do what you want:
public static void generate([CCode (array_length = false)] char[]
new_uuid);
and
char[] uuid = new char[16];
generate(uuid);
Regards,
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]