Next Previous Up Top Contents Index

6 Type Reference

:function

FLI type descriptor

Summary

Converts between Lisp and the Cfunction type.
Package

fli

Syntax

:function &optional arg-spec return-spec

Arguments

arg-spec

A list of function argument types.

return-spec

A list of function return types.

Description

The FLI:function type allows for conversion from the Cfunction type. It is typically used in conjunction with the:pointer type to reference an existing foreign function.
Example

The following code lines present a definition of a pointer to a function type, and a corresponding C definition of the type. The function type is defined for a function which takes as its arguments an integer and a pointer to a void, and returns an integer value.
(:pointer (:function (:int (:pointer :void)) :int))

int (*)( int, void * )

See Also

:pointer

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker