1.0.46.19: add :NOT-NULL option to C-STRING type
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 2 Mar 2011 09:40:22 +0000 (09:40 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 2 Mar 2011 09:40:22 +0000 (09:40 +0000)
commitbb3994fcc9a556d1a26d35f6ff9386d01030821d
tree61c3df438650d4d57d33cb74f92821bb2d44829f
parent4078d29d83e45a0b059ca5a71877ec36a4174a01
1.0.46.19: add :NOT-NULL option to C-STRING type

 By default NIL is a valid C-STRING, translated to and from C's NULL. This is
 very convenient because many C functions that normally return strings return
 NULL to indicate "false" or "don't know" -- and less commonly also special
 case it as an argument.

 There are however many C functions that don't check for NULL, so we want a
 non-horrible way to say that NIL is not a good value to pass on...

 ...it remains to be seen if this is non-horrible enough, but at least it
 fixes a bunch of memory faults from doing things like (posix-getenv nil), and
 replaces them with type-errors.

 Not all C-STRING types have been audited yet, just a bunch of the more
 obvious ones.
NEWS
contrib/sb-posix/interface.lisp
doc/manual/ffi.texinfo
src/code/host-c-call.lisp
src/code/unix.lisp
tests/alien.impure.lisp
version.lisp-expr