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)
LispWorks Foreign Language Interface User Guide and Reference Manual - 29 Sep 2017