[plt-scheme] _bytes in FFI

From: Pedro Pinto (pedro.e.pinto at gmail.com)
Date: Thu Mar 15 01:08:33 EDT 2007

Hi there,

It looks like the following:

(require (lib "foreign.ss")) (unsafe!)

(define libcrypt (ffi-lib "libcrypt"))

(define crypt
   (get-ffi-obj "crypt" libcrypt (_fun _string _string -> _bytes)))

will not work outside a module, at least on 360 on MacOS. I get:

procedure application: expected procedure, given: #f; arguments were:  
#<struct:fun-syntax> #<syntax:6:57>

The problem goes away if I replace _bytes with _pointer or if I wrap  
the whole thing in a module.

What gives?


Posted on the users mailing list.