chickadee » foreign » types » nonnull-c-string

c-stringtype
nonnull-c-stringtype

A zero-terminated C string. The argument value #f is allowed and is passed as a NULL pointer; similarly, a NULL pointer is returned as #f. Note that the string contents are copied into (automatically managed) temporary storage with a zero byte appended when passed as an argument. Also, a return value of this type is copied into garbage collected memory using strcpy(3).

For the nonnull- variant, passing #f will raise an exception, and returning a NULL pointer will result in undefined behavior (e.g. a segfault).