Package: cffi

Function foreign-bitfield-value

Lambda List

foreign-bitfield-value (type symbols)

Arguments

type -- A bitfield type.
symbol -- A Lisp symbol.
value -- An integer.

Details

The function foreign-bitfield-value returns the value that corresponds to the symbols in the symbols list.

Examples

  (defbitfield flags
    (flag-a 1)
    (flag-b 2)
    (flag-c 4))

CFFI> (foreign-bitfield-value 'flags '(flag-a flag-c)) => 5 ; #b101
 

See also