[plt-scheme] cffi.ss

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Wed Jun 25 02:19:28 EDT 2003

Ed Cavazos wrote:
> I noticed in the Gambit-C manual that an allowed type specifier in
> c-lambda is one of: "c-type-id". So, just a string naming a C
> type. For example, given these 2 C function prototypes:
> person make_person(char *name);
> int    move_person(person p);
> I guess the c-lambda code would be:
> (c-lambda (char-string) "person" "make_person")
> (c-lambda ("person")    int      "move_person")
> It doesn't look like the current cffi.ss supports this. Would adding
> this be as simple as modifying cffi.ss or would support have to be
> added to mzc itself?
> Ed

I believe in Gambit this should be:

(c-define-type person "person")
(c-lambda (char-string) person "make_person")
(c-lambda (person)      int    "move_person")


Posted on the users mailing list.