Converts a Lisp integer to foreign bytes while executing a body of code.
fli
with-integer-bytes (pointer length) integer &body body => last
pointer⇩ |
A variable to be bound to the foreign pointer. |
length⇩ |
A variable to be bound to the length in bytes. |
integer⇩ |
An integer. |
body⇩ |
Forms to be executed. |
last |
The value of the last form in body. |
The macro with-integer-bytes
evaluates the forms in body with pointer bound to a dynamic foreign object containing the bytes of integer and length bound to 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.
5.3 Lisp integers
convert-integer-to-dynamic-foreign-object
make-integer-from-bytes
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58