Next: , Previous: foreign-bitfield-symbols, Up: Foreign Types


foreign-bitfield-value

Syntax

— Function: foreign-bitfield-value type symbols ⇒ value

Arguments and Values

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

Description

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

defbitfield
foreign-bitfield-symbols