In C/C++ you can declare a bit field as a struct by specifying the number of bits to use for a given field in a struct. e.g.:
typedef struct {
char threeBits : 3;
char fiveBits : 5;
} MyBitField;
If we ask the size of this we get 1:
printf("sizeof(MyBitField): %d\n", sizeof(MyBitField)); // prints: "sizeof(MyBitField): 1"
Is it possible to define these special kind of structs in Cython?
I looked at the docs and didn't see any syntax to support this.