Hi all,
This patch adds bitfield support to the groveller. Here is the usage:
In grovel file, write:
(bitfield flags-ctype ((:flag-a "FLAG_A") :documentation "DOCU_A") ((:flag-b "FLAG_B") :documentation "DOCU_B") ((:flag-c "FLAG_C") :documentation "DOCU_C"))
And if the C header file has:
#define FLAG_A 1 #define FLAG_B 2 #define FLAG_C 4
This will generate:
(cffi:defbitfield (flags-ctype) (:flag-a 1) (:flag-b 2) (:flag-c 4))
Documentation is also provided in the patch.
Thanks