chickadee » foreign » types » c-pointer

c-pointertype
(c-pointer TYPE)type
nonnull-c-pointertype
(nonnull-c-pointer TYPE)type

An operating-system pointer or a locative. c-pointer is untyped, whereas (c-pointer TYPE) points to an object of foreign type TYPE.

The value #f is allowed and is passed to C as a NULL pointer; similarly, NULL is returned as #f. For the two nonnull- variants, passing #f will raise an exception, and returning NULL will result in a null pointer object.

(Note: It is still possible to deliberately pass a null pointer through a nonnull-c-pointer by manually creating a null pointer object, e.g. via (address->pointer 0).)