Next Previous Up Top Contents Index

5 Function and Macro Reference

pointer-eq

Function

Summary

Test whether two pointers point to the same memory address.
Package

fli

Signature

pointereq pointer1 pointer2 => boolean

Arguments

pointer1

An FLI pointer.

pointer2

An FLI pointer.

Values

boolean

If pointer1 points to the same address as pointer2,pointer-eq returnst, otherwise it returnsnil.

Description

The functionpointer-eq tests whether two pointers point to the same address, and returnst if they do, andnil if they do not.
Example

In the following example a pointer,point1, is defined, andpoint2 is set equal to it. Both are then tested to see if they are equal to each other usingpointer-eq. Thenpoint2 is defined to point to a different object, and the two pointers are tested for equality again.
(setq point1 (fli:allocate-foreign-object :type :int))

(setq point2 point1)

(fli:pointer-eq point1 point2)

(setq point2 (fli:allocate-foreign-object :type :int))

(fli:pointer-eq point1 point2)

See Also

null-pointer-p
pointerp

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker