Add bitfield support to the groveller
Bug #622338 reported by
Luís Oliveira
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CFFI |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On Sat, May 1, 2010 at 1:26 AM, Desmond O. Chang <email address hidden> wrote:
> 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.
Changed in cffi: | |
status: | New → Fix Committed |
Changed in cffi: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Tested on SBCL 1.0.42 on Linux 64 bits, works fine.
I hope it will be integrated to cffi, this is a very useful patch.