type is used to allocate an object which can be one of a number of types. The types must have the same underlying structure, which means they must have the same size and must be referenced in the same manner. The FLI
type is useful when a foreign function returns a value whose underlying type is known, but whose exact type is not.
is set to be 100 using
, it is taken to be an object of type
, as this is the first element in the sequence of types defined by
which matches the type of the number 100.
(setf (fli:dereference thing) 100)
is now dereferenced, it is returned as a pointer to the address 100 (Or hex address 64), as there is no method for determining the type of
, and therefore the first element in the list of