Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1352 Static arrays inside C-Structs, CFFI

open
nobody
5
2013-12-22
2013-12-22
No

I was trying to generate bindings for a C-struct with a statically declared array, something quite like,

struct astruct{
int x[10];}

SWIG seems to think that "x" in the struct is a pointer, which is not correct, because
there is no dereferencing involved. SWIG generates,
(cffi:defcstruct astruct
(x :pointer))

It should however have been,
(cffi:defcstruct astruct
(x :int :count 10))

I'm not sure if this is backend specific.

Discussion