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

pointerp Function

Summary

Tests whether an object is a pointer or not.

Package

fli

Signature

pointerp pointer => result

Arguments
pointer
An object that may be a FLI pointer.
Values
result
A boolean.
Description

The function pointerp tests whether the argument pointer is a pointer.

result is t if pointer is a pointer, otherwise nil is returned.

Examples

In the following example a pointer, point, is defined, and an object which is not a pointer is defined. Both are tested using pointerp.

(setq point (fli:allocate-foreign-object :type :int))
(setq not-point 7)
(fli:pointerp point)
(fli:pointerp not-point)
See also

3.2 Pointer testing functions
null-pointer-p
pointer-address
pointer-eq


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58