[cffi-devel] Groveller's bitfield support
Desmond O. Chang
dochang at gmail.com
Sat May 1 00:26:18 UTC 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grovel-bitfield.patch
Type: text/x-diff
Size: 1339 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100501/57b25c30/attachment.patch>
More information about the cffi-devel
mailing list