Try removing it everywhere. Structs are always translated into pointers, so every Descriptor * should be plain Descriptor instead. Where you need to pass pointers to simple types (e.g. double *), use “typename?” instead, like double? double_pointer_param.
Another thing that is suspicious to me is char[,] PortNames, but it may be I just haven’t seen such Vala construct before. On Sun, Sep 11, 2016, 18:37 Victor Aurélio Santos < victoraur.san...@gmail.com> wrote: > Don't know.. but the error stays even changing > > Em 11 de set de 2016 13:30, "Gergely Polonkai" <gerg...@polonkai.eu> > escreveu: > >> Should not that be (Descriptor instance, ulong port, double? >> dataLocation) instead? Using asterisk in Vala seems unnatural to me… >> >> On Sun, Sep 11, 2016, 18:09 Victor Aurélio Santos < >> victoraur.san...@gmail.com> wrote: >> >>> What I've tried: >>> >>> [CCode (copy_function="", destroy_function="")] >>> public struct Descriptor >>> { >>> public ulong UniqueID; >>> public const char[] Label; >>> public Properties Properties; >>> public const char[] Name; >>> public const char[] Maker; >>> public const char[] Copyright; >>> public ulong PortCount; >>> public const PortDescriptor[] PortDescriptors; >>> public const char[,] PortNames; >>> public const PortRangeHint[] PortRangeHints; >>> public void[] ImplementationData; >>> >>> public Descriptor instantiate(Descriptor* descriptor, ulong >>> sampleRate); >>> >>> [CCode (has_target = false)] >>> public delegate void connect_port(Descriptor* instance, ulong >>> port, double* dataLocation); >>> >>> public void activate(Descriptor* instance); >>> >>> public void run(Descriptor* instance, ulong sampleCount); >>> >>> public void run_adding(Descriptor* instance, ulong sampleCount); >>> >>> public void set_run_adding_gain(Descriptor* instance, Data gain); >>> >>> public void deactivate(Descriptor* instance); >>> >>> public void cleanup(Descriptor* instance); >>> } >>> >>> The valac complaints: >>> >>> LADSPA.vapi:52.9-52.41: error: unexpected declaration >>> public delegate void connect_port(Descriptor* instance, ulong >>> port, double* dataLocation); >>> >>> 2016-09-10 20:18 GMT-03:00 Al Thomas <astav...@yahoo.co.uk>: >>> >> From: Victor Aurélio Santos <victoraur.san...@gmail.com> >>> >> Sent: Saturday, 10 September 2016, 23:57 >>> >> Subject: Re: [Vala] LADSPA bindings >>> > >>> >> I'm trying to use plugins from vala, not to write! >>> >> I'm stuck at writing the vapi file, most specifically at the >>> Descriptor struct. >>> > >>> > >>> > Take a look at >>> https://wiki.gnome.org/Projects/Vala/LegacyBindings#Binding_a_C_Struct.27s_Fields >>> > The function pointers are targetless delegates. There is no >>> > >>> > memory handling for the struct so I don't think it should be >>> > >>> > bound as a compact class. >>> >>> >>> >>> -- >>> Victor Aurélio Santos >>> _______________________________________________ >>> vala-list mailing list >>> vala-list@gnome.org >>> https://mail.gnome.org/mailman/listinfo/vala-list >>> >> _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list