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

NextPrevUpTopContentsIndex

pointer-element-size

Function
Summary

Returns the size in bytes of a foreign object or a foreign type.

Package

fli

Signature

pointer-element-size pointer-or-type => size

Arguments

pointer-or-type

A FLI pointer to a foreign object or the name of a FLI pointer type.

Values

size

A non-negative integer.

Description

The function pointer-element-size returns the size, in bytes, of the object or type specified.

If pointer-or-type is an FLI pointer, size is the size, in bytes, of the object pointed to by pointer-or-type.

If pointer-or-type is the name of a FLI pointer type, size is the size, in bytes, of the elements of that type.

Example

In the following example a pointer to an integer is created. Then the size in bytes of the integer is returned using pointer-element-size.

(setq point (fli:allocate-foreign-object :type :int)) (fli:pointer-element-size point)
See also

Pointer testing functions
pointer-element-type
size-of


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

NextPrevUpTopContentsIndex