Converts between Lisp boolean and C int.
keyword
:int-boolean
The FLI type :int-boolean converts between a Lisp boolean and a C int. Lisp nil is converted to 0 in C, and a non-nil value is converted to 1 in C. 0 in C is converte to nil, and any other value in C is converted to t.
:int-boolean is intended to be used in "old" C where conceptual booleans are declared int. For example, the C function isatty returns an int, but conceptually it is a boolean.
If the C type is _Bool (or bool when the stdbool.h header is included), then you should use :bool instead of :int-boolean.
Foreign Language Interface User Guide and Reference Manual - 18 Feb 2025 15:36:34