Tests a pointer to see if it is a null pointer.
fli
null-pointer-p pointer => result
pointer⇩ |
A FLI pointer. |
result⇩ |
A boolean. |
The function null-pointer-p
is used to determine if a pointer is a null pointer. A null pointer is a pointer pointing to address 0.
If pointer is a null pointer (that is, a pointer pointing to address 0) then result is true, otherwise null-pointer-p
returns false.
In the following example a pointer to an :int is defined, and tested with null-pointer-p
. The pointer is then freed, becoming a null pointer, and is once again tested using null-pointer-p
.
(setq point (fli:allocate-foreign-object :type :int))
(fli:null-pointer-p point)
(fli:free-foreign-object point)
(fli:null-pointer-p point)
3.2 Pointer testing functions
5.5.1.1 Testing whether a function is defined
*null-pointer*
pointer-address
pointer-eq
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58