Passing an array of strings to C code.
The following vala code to call a C function passes the parameter as null terminated array of pointers:
extern void show (string[] strings);
void main ()
{
string[] strings = { "a1", "b2" };
show (strings);
}
Where as this vala code passes the parameter as an array of pointers without the null terminator:
extern void show (string[] strings);
void main ()
{
const string[] strings = { "a1", "b2" };
show (strings);
}
Is this as designed? (also this may be related to #626)
Edited by Rico Tzschichholz