Package: cffi

Generic Function foreign-type-size

Lambda List

foreign-type-size (foreign-type)

Arguments

type -- A foreign type.
size -- An integer.

Details

The function foreign-type-size return the size of type in bytes. This includes any padding within and following the in-memory representation as needed to create an array of type objects.

Examples

  (defcstruct foo
    (a :double)
    (c :char))

CFFI> (foreign-type-size :double) => 8 CFFI> (foreign-type-size :char) => 1 CFFI> (foreign-type-size 'foo) => 16
 

See also