Initializer of array-fields in structs missing value for _*_size_
Array-fields in struct
have an addtional _*_size_
field if they have a length.
struct Foo {
public unowned string[] array;
public int i;
}
translates to
typedef struct _Foo Foo;
struct _Foo {
gchar** array;
gint array_length1;
gint _array_size_;
gint i;
};
Now this _*_size_
field gets omitted when using a struct initializer like:
const string[] SARRAY = { "foo", "bar" };
const Foo FOO = { SARRAY, 23 };
translates to:
const gchar* SARRAY[2] = {"foo", "bar"};
const Foo FOO = {SARRAY, G_N_ELEMENTS (SARRAY), 23};
and should be:
const gchar* SARRAY[2] = {"foo", "bar"};
const Foo FOO = {SARRAY, G_N_ELEMENTS (SARRAY), G_N_ELEMENTS (SARRAY), 23};