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

NextPrevUpTopContentsIndex

with-integer-bytes

Macro
Summary

Converts a Lisp integer to foreign bytes while executing a body of code.

Package

fli

Signature

with-integer-bytes (pointer length) integer &body body => last

Arguments

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.

Values

last

The value of the last form in body.

Description

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.

See also

Lisp integers
convert-integer-to-dynamic-foreign-object
make-integer-from-bytes


LispWorks Foreign Language Interface User Guide and Reference Manual - 16 Feb 2015

NextPrevUpTopContentsIndex