The function foreign-block-copy
makes and returns a copy of the foreign block foreign-block. It corresponds to the C function _Block_copy
.
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.
foreign-block-copy
is implemented in LispWorks for Macintosh only.LispWorks Foreign Language Interface User Guide and Reference Manual - 29 Sep 2017