Re: [Vala] Manual VAPI writing
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Harry Van Haaren <harryhaaren gmail com>
- Cc: jak debian org, vala-list gnome org
- Subject: Re: [Vala] Manual VAPI writing
- Date: Thu, 1 Jul 2010 19:36:34 +0100
oops, forgot to reply to all.
2010/7/1, Abderrahim Kitouni <a kitouni gmail com>:
Hi,
2010/6/30, Harry Van Haaren <harryhaaren gmail com>:
Any pointers as to how to do this? Cheers, -Harry
> > Use cprefix="" - maybe you also need to set cname="int" in order to have
> > Vala know what to call the type of the values.
> >
>
>
> Yes! Thanks, that worked a charm.
>
>
> Next stumbling block found:
> when opening a file, sf_open(...) is called. To close the file,
> sf_close(file) must be called.
>
> [CCode (cheader_filename="sndfile.h",cname ="SNDFILE")]
> class Sndfile
> {
> [CCode (cname="sf_open", free_function="sf_close")]
> public Sndfile(string path, FileMode mode, out Info sf_info );
> }
free_function should be set on the class, not the constructor. Valac
should probably warn on unreconized annotations.
btw, your class should be compact.
HTH,
Abderrahim
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]