Next: , Previous: foreign-slot-value, Up: Foreign Types


foreign-type-alignment

Syntax

— Function: foreign-type-alignment type ⇒ alignment

Arguments and Values

type
A foreign type.
alignment
An integer.

Description

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 '(:struct foo))
  => 1

See Also

foreign-type-size