All Manuals > Foreign Language Interface User Guide and Reference Manual > 8 Type Reference

:const FLI Type Descriptor

Summary

Corresponds to the C const type.

Package

keyword

Syntax

:const &optional type

Arguments
type
The type of the constant. The default is :int.
Description

The FLI type :const corresponds to the C const type qualifier. The behavior of a :const is exactly the same as the behavior of its type, and it is only included to ease the readability of FLI code and for naming conventions.

Examples

In the following example a constant is allocated and set equal to 3.141.

(setq pi1 (fli:allocate-foreign-object
           :type '(:const :float)))
(setf (fli:dereference pi1) 3.141))
See also

:volatile
2.1 Immediate types


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