The function convert-integer-to-dynamic-foreign-object
makes a dynamic foreign object containing the bytes of integer and returns pointer pointing to the first byte of that object and length which is the number of bytes in that object. The layout of the bytes is unspecified, but the bytes and the length are sufficient to reconstruct integer by calling make-integer-from-bytes.
LispWorks Foreign Language Interface User Guide and Reference Manual - 16 Feb 2015