In Cython glue declarations, how do I represent a C struct
type containing an anonymous union? For example, if I have a C header file mystruct.h
containing
struct mystruct
{
union {
double da;
uint64_t ia;
};
};
then, in the corresponding .pyd
file
cdef extern from "mystruct.h":
struct mystruct:
# what goes here???
I tried this:
cdef extern from "mystruct.h":
struct mystruct:
union {double da; uint64_t ia;};
but that only gave me "Syntax error in C variable declaration" on the union
line.