Returns the size in bytes of a foreign object or a foreign type.
fli
pointer-element-size pointer-or-type => size
pointer-or-type⇩ |
A FLI pointer to a foreign object or the name of a FLI pointer type. |
size⇩ |
A non-negative integer. |
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.
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)
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58