Skip to content
Commit 8a267d35 authored by Desmond O. Chang's avatar Desmond O. Chang
Browse files

Add groveller bitfield support

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))
parent b4930243
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment