Next Previous Top Contents Index

LispWorks Foreign Language Interface

2 FLI Types

A central aspect of the FLI is implementation of foreign language types. FLI variables, function arguments and temporary objects have predictable properties and structures which are analogous to the properties and structures of the types found in C. The FLI can translate Lisp data objects into FLI data objects, which are then passed to the foreign language, such as C. Similarly, data can be passed from C or the Windows functions to the FLI, and then translated into a suitable Lisp form. The FLI types can therefore best be seen as an intermediate stage in the passing of data between Lisp and other languages.

Here are some of the features and sorts of foreign types:

The FLI no longer creates the named accessors. Instead, several generalized accessors use information stored within the foreign type object in order to destructure the foreign object. These accessors arefli:foreign-slot-value,fli:foreign-aref-with-no-allocation, foreign-aref and dereference.

There are two fundamental sorts of FLI types: immediate and aggregate. Immediate types, which correspond to the C fundamental types, are so called because they are basic data types such as integers, booleans and bytes which have a direct representation in the computer memory. Aggregate types, which correspond to the C derived types, consist of a combination of immediate types, and possible of smaller aggregate types. Examples of aggregate types are arrays and structures. Any user defined type is an aggregate type.

2.1 - Immediate types
2.2 - Aggregate types
2.3 - Parameterized types
2.4 - Encapsulated types
2.5 - The void type
2.6 - Summary

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Top Contents Index

Generated with Harlequin WebMaker