All Manuals > LispWorks Foreign Language Interface User Guide and Reference Manual > 7 Function and Macro Reference

NextPrevUpTopContentsIndex

define-foreign-block-invoker

Macro
Summary

Defines an invoker of a foreign block, in LispWorks for Macintosh.

Package

fli

Signature

define-foreign-block-invoker the-name args &key lambda-list documentation result-type language stack no-check reentrant calling-convention

Arguments

the-name

A symbol.

args

Arguments.

The other arguments are as for define-foreign-function

Description

The macro define-foreign-block-invoker defines an invoker of a foreign block.

It defines the-name to be a function that can be used to invoke foreign blocks which takes arguments that match args. The block is then invoked by simply calling the function the-name with the block and arguments:

(the-name block arg1 arg2 ...)

The block argument is of type foreign-block-pointer.

define-foreign-block-invoker is very similar to define-foreign-funcallable and define-foreign-function, and all the remaining arguments are interpreted in the same way.

Notes

The lambda list of the invoker is (block . args). When lambda-list is supplied, define-foreign-block-invoker inserts in front of the supplied lambda-list an additional argument for the block. Therefore a supplied lambda-list must not include an argument for the block. Similarly a supplied lambda-list in define-foreign-funcallable should not include an argument for the function.

define-foreign-block-invoker returns the-name.

define-foreign-block-invoker is implemented in LispWorks for Macintosh only.

Examples
(example-edit-file "fli/foreign-blocks") (example-edit-file "fli/invoke-foreign-block")
See also

define-foreign-funcallable
define-foreign-function
foreign-block-pointer
Block objects in C (foreign blocks)


LispWorks Foreign Language Interface User Guide and Reference Manual - 16 Feb 2015

NextPrevUpTopContentsIndex