Makes a copy of a foreign block, in LispWorks for Macintosh.
foreign-block-copy foreign-block => new-foreign-block
A foreign block pointer.
new-foreign-block A foreign block pointer.
foreign-block-copy makes and returns a copy of the foreign block foreign-block. It corresponds to the C function
foreign-block can be any foreign block.
The result of the copy is another foreign block with an indefinite scope, which has the same attributes as foreign-block. In other words, invoking the copy invokes the same function.
The new foreign block cannot be garbage collected. It should be freed when you are finished with it by foreign-block-release.
foreign-block-copy is not expected to be commonly useful. You need it when you get passed a block and you want to use it outside the scope of the call in which it was passed, unless it is documented that the block is global.
If you use new-foreign-block with a function that is documented to release the block, you must not call foreign-block-release on it. However, we do not expect this situation to happen, because a proper interface will only free blocks that it allocates.
foreign-block-copy is implemented in LispWorks for Macintosh only.
LispWorks Foreign Language Interface User Guide and Reference Manual - 16 Feb 2015