[plt-scheme] c-lambda NULL -> #f

From: dvanhorn at emba.uvm.edu (dvanhorn at emba.uvm.edu)
Date: Wed Oct 30 18:05:14 EST 2002


I've been using the foreign-function interface to C and have come accross a
problem with returning NULL pointers.

The compiler manual states the C to Scheme conversion is NULL -> #f, but...

(define f
  (c-lambda () (pointer "char") "___result = NULL;"))

(f) -> #<c-pointer:char> and not #f as I had expected.

Am I doing something wrong here?


dvanhorn at cs dot uvm dot edu

Posted on the users mailing list.