Next: , Previous: null-pointer, Up: Pointers


null-pointer-p

Syntax

— Function: null-pointer-p ptr ⇒ boolean

Arguments and Values

ptr
A foreign pointer that may be a null pointer.
boolean
T or NIL.

Description

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

null-pointer
pointerp