All Manuals > LispWorks Foreign Language Interface User Guide and Reference Manual > 4 Advanced Uses of the FLI > 4.8 Block objects in C (foreign blocks)

NextPrevUpTopContentsIndex

4.8.2 Operations on foreign blocks

You might obtain a foreign pointer of type foreign-block-pointer that was passed as an argument to another foreign block, to a callable defined by define-foreign-callable or returned by a foreign function.

The foreign block can be invoked by defining an invoker (at load time) using define-foreign-block-invoker, and calling the invoker. If you need to keep the block after returning to the caller, you normally need to copy it by foreign-block-copy. If you copy a block, once you are finished with it, you should release it by foreign-block-release.

For examples of this see

examples/misc/invoke-foreign-block.lisp

LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011

NextPrevUpTopContentsIndex