Next: , Previous: , Up: Pointers   [Contents][Index]


make-pointer

make-pointer

Syntax

Function: make-pointer address ⇒ ptr

Arguments and Values

address

An integer.

ptr

A foreign pointer.

Description

The function make-pointer will return a foreign pointer pointing to address.

Examples

  CFFI> (make-pointer 42)
  ⇒ #<FOREIGN-ADDRESS #x0000002A>
  CFFI> (pointerp *)
  ⇒ T
  CFFI> (pointer-address **)
  ⇒ 42
  CFFI> (inc-pointer *** -42)
  ⇒ #<FOREIGN-ADDRESS #x00000000>
  CFFI> (null-pointer-p *)
  ⇒ T
  CFFI> (typep ** 'foreign-pointer)
  ⇒ T

See Also

inc-pointer
null-pointer
null-pointer-p
pointerp
pointer-address
pointer-eq
mem-ref