[Ecls-list] FFI and null C strings
Goffioul Michael
goffioul at imec.be
Wed Nov 24 05:44:36 UTC 2004
Hi,
I found an annoying problem while fixing FFI issues. This is related
to null C strings. One example is for example:
(ffi:def-function ("getenv" c-getenv)
((name :cstring))
:returning cstring)
If the variable doesn't exist, "getenv" returns NULL. However, the
generated C code convert the returned value to a LISP string using
make_string_copy, which doesn't support NULL as input argument.
Would it be OK to change make_string_copy such that it returns NIL
when the input is NULL?
Michael.
More information about the ecl-devel
mailing list