All Manuals > Foreign Language Interface User Guide and Reference Manual > 7 Function, Macro and Variable Reference

align-of Function

Summary

Returns the alignment in bytes of a foreign type.

Package

fli

Signature

align-of type-name => alignment

Arguments
type-name
A foreign type whose alignment is to be determined.
Values
alignment
The alignment of the foreign type type-name in bytes.
Description

The function align-of returns the alignment in bytes of the foreign language type named by type-name.

Examples

The following example shows types with various alignments.

(fli:align-of :char)
=>
1
 
(fli:align-of :int)
=> 
4
 
(fli:align-of :double)
=>
8
 
(fli:align-of :pointer)
=>
4
See also

allocate-foreign-object
free-foreign-object


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58