[Vala] CCode array length field name



Didn't see anything quickly browsing through the regular spots... maybe
someone here can help me out.

Binding for a vapi.

c struct:

struct SomeStruct {
uint8 *data;
size_t dataLength;
};

vapi binding:

public class SomeStruct {
[CCode (array_param_name?...)] // what should this be ?
uint8[] data;
}

used in vala:

var foo = new SomeStruct ();
stdout.printf ("length: %u\n", foo.data.length);

generated c code:

fprintf (stdout, "length: %u\n", foo->data.data_length1); // should be
foo->data.dataLength

Thanks for any help.

-- 
aaron r andersen


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