See the LispWorks Foreign Language Interface User Guide and Reference Manual for details of these changes.
64-bit integer types such as
:uint64 are now supported on 32-bit LispWorks for
fli:define-foreign-callable and also for struct, union and pointer access with functions such as
fli:dereference. In LispWorks 6.1 and earlier versions, they could only be used by
In LispWorks 6.1 and earlier versions, a foreign function argument whose type is a struct (that is, passing the structure by value) required a foreign struct object to be used. The LispWorks FLI now also allows a pointer to a foreign struct to be used.
The new function
fli:foreign-function-pointer returns a FLI pointer with its address set to the address of a foreign symbol, which can be either a symbol defined in a foreign library or a foreign callable.
fli:foreign-function-pointer has several advantages over
fli:make-pointer, when making a pointer to a defined foreign symbol. The pointer is automatically updated on image restart, for a given symbol the same pointer is returned in each call so repeated allocation is avoided.
fli:foreign-function-pointer is especially useful for creating pointers for passing the address of foreign callables to foreign code in situations where the same address is used repeatedly.
On the other hand
fli:foreign-function-pointer keeps a Lisp pointer to its result. Therefore if you use the FLI pointer only once you should create it with
fli:make-pointer, to allow the Garbage Collector to discard it.
fli:make-pointer now checks that either the symbol-name or address keyword argument is supplied, and signals an error otherwise. In LispWorks 6.1 and earlier versions it does not check, which can lead to incorrect behavior on some operating systems.
LispWorks Release Notes and Installation Guide - 2 Mar 2015