Add bitfield support to the groveller

Bug #622338 reported by Luís Oliveira
6
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.

Tags: grovel
Revision history for this message
Luís Oliveira (luismbo) wrote :
Revision history for this message
2fc61b15b9d24aebf9466b941187216f (2fc61b15b9d24aebf9466b941187216f-deactivatedaccount) wrote :

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.

Luís Oliveira (luismbo)
Changed in cffi:
status: New → Fix Committed
Luís Oliveira (luismbo)
Changed in cffi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.