Package: cffi

Function null-pointer-p

Lambda List

null-pointer-p (ptr)

Arguments

ptr -- A foreign pointer that may be a null pointer.

Return Value

T or NIL.

Details

The function null-pointer-p returns true if ptr is a null pointer and false otherwise.

Examples

  CFFI> (null-pointer-p (null-pointer))
  => T

(defun contains-str-p (big little) (not (null-pointer-p (foreign-funcall "strstr" :string big :string little :pointer))))

CFFI> (contains-str-p "Popcorns" "corn") => T CFFI> (contains-str-p "Popcorns" "salt") => NIL
 

See also