Can't build CFFI with C code involving nested arrays
I have some C functions involving arguments that are nested arrays (2D and up). For example:
void ComputeMagnitude(const int32_t vector[][3]) {
...
}
The argument vector
is basically a list of 3-component vectors. If I try to build that with CFFI, it will throw the following exception:
static void _cffi_d_ComputeMagnitude(int32_t(const * x1)[3])
~~~ ^
build/temp.macosx-10.9-x86_64-3.9/my_algo_cffi.c:976:82: error: function cannot return array type 'int32_t [3]'
However, when I remove the nested [3]
, it builds just fine!
Is there a way to make this work with the nested array intact? Or is it because CFFI can't interpret nested arrays in C yet?