All Manuals > Release Notes and Installation Guide > 12 Release Notes

12.10 Foreign Language interface changes

See the Foreign Language Interface User Guide and Reference Manual for details of these changes.

12.10.1 :allow-null now defaults to nil for foreign strings as documented

The function fli:convert-from-foreign-string now gives an error when the pointer is a null pointer and the allow-null argument is true. In previous releases, a null pointer was always converted to nil. Pass :allow-null t if you want the previous behavior.

The functions fli:convert-to-foreign-string and fli:convert-to-dynamic-foreign-string now give an error when the string is nil and the allow-null argument is false. In previous releases, nil converted to a foreign string with length 0. Pass a Lisp string with length 0 if you want the previous behavior.

12.10.2 Checking for a valid foreign type

The function fli:valid-foreign-type-p has been added as a predicate to check if its argument is a valid foreign type.

12.10.3 fli:incf-pointer and fli:decf-pointer signal an error for types of size 0

The functions fli:incf-pointer and fli:decf-pointer now signal an error if the type pointed to by the argument has size 0 (for example, a void type).

12.10.4 Support for the C99 _Bool type (stdbool.h)

The foreign type :boolean now supports the C99 _Bool by using the form (:boolean :standard).

12.10.5 Control of when fli:install-embedded-module deletes it temporary file

The function fli:install-embedded-module now has a keyword argument delay-delete that controls the time of deletion of the temporary file that is created for the module. A new variable fli:*install-embedded-module-delay-delete* is used as the default value for the keyword.

12.10.6 Use of dlopen on macOS

LispWorks now uses dlopen to load foreign modules on macOS, like on other non-Windows platforms. The default value of the :dlopen-flags argument to the function fli:register-module is now t on all platforms.


Release Notes and Installation Guide - 01 Dec 2021 19:38:49