All Manuals > Foreign Language Interface User Guide and Reference Manual > 7 Function, Macro and Variable Reference

convert-integer-to-dynamic-foreign-object Function

Summary

Converts a Lisp integer to foreign bytes.

Package

fli

Signature

convert-integer-to-dynamic-foreign-object integer => pointer, length

Arguments
integer
An integer.
Values
pointer
A foreign pointer.
length
An integer.
Description

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.

See also

5.3 Lisp integers
with-integer-bytes
make-integer-from-bytes


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58