Package: cffi

Generic Function foreign-type-alignment

Lambda List

foreign-type-alignment (foreign-type)

Arguments

type -- A foreign type.
alignment -- An integer.

Details

The function foreign-type-alignment returns the alignment of type in bytes.

Examples

  CFFI> (foreign-type-alignment :char)
  => 1
  CFFI> (foreign-type-alignment :short)
  => 2
  CFFI> (foreign-type-alignment :int)
  => 4

(defcstruct foo (a :char))

CFFI> (foreign-type-alignment 'foo) => 1
 

See also