Next: , Previous: Function Parameters, Up: sb-posix


16.3.4 Function Return Values

The return value is usually the same as for the C binding, except in error cases: where the C function is defined as returning some sentinel value and setting errno on error, we instead signal an error of type SYSCALL-ERROR. The actual error value (errno) is stored in this condition and can be accessed with SYSCALL-ERRNO.

We do not automatically translate the returned value into “Lispy” objects – for example, SB-POSIX:OPEN returns a small integer, not a stream. Exception: boolean-returning functions (or, more commonly, macros) do not return a C integer, but instead a Lisp boolean.