Vala arrays broken?

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

 



Hi,

I wanted to enumerate the ports on the cards through vala today. I
quickly found that the vala binding was not up-to-date, so I added
fields for that (see attachment).

However, to be able to access the card ports, I needed to do two things
differently from how the existing arrays look:

 1) I needed to add this line to indicate the length of the array:

[CCode (array_length_cname="n_ports", array_length_type="uint32")]

 2) I needed to add a question mark to indicate these are
pointer-to-pointers (pa_card_port_info **). Otherwise vala would think
they are simple pointers (pa_card_port_info *) and fail with a segfault.

This raises the question if anybody ever has used these arrays before
and got them to work, or if I should just change this on all arrays
(with pointer-to-pointers)? Anybody who knows?

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vala_card_ports.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131008/22dfcad6/attachment.bin>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux