[plt-scheme] cffi questions

From: David A. Herman (dherman at ccs.neu.edu)
Date: Thu Jan 1 20:07:13 EST 2004

> Probably the simplest solution is to pass it in as an argument to the C
> function. In other words, add a scheme-object argument to c-func, and
> instead of exporting c-func, export a wrapper that calls c-func with
> local-func plus the rest of the arguments.

Simple enough.

> It's safe, and from now on, those bidings will be guaranteed and
> documented.


> Would it help to have a `c-include' macro that reads the content of a
> file and produces a `c-declare' form? That way, MzScheme can figure out
> the path relative to the `c-include' use, instead of having the C
> compiler deal with it.

Definitely, thanks.

> I've added `c-include' to cffi. It's implemented as follows, but with
> slightly more error checking.
>   (require-for-syntax (lib "path-spec.ss" "syntax"))

Ah, I was looking for a library like path-spec -- that's useful.

Thanks so much!


Posted on the users mailing list.