[plt-scheme] Eli Barzilay's new FFI stuff

From: Christopher Armstrong (radeex at gmail.com)
Date: Sat Aug 7 11:20:41 EDT 2004

On Fri, 6 Aug 2004 09:02:41 -0400, Eli Barzilay <eli at barzilay.org> wrote:
> But there are probably lots of little tweaks and
> changes that will come when more people use it, so feedback is very
> helpful at this stage.  Mail me or the list if you have any questions,
> suggestions, etc. 

I found another problem: I've got a string object struct that defines
a string with 'size' and 'val' fields, where the val field is just
defined as 'char sval[1];' in the real struct definition.

I figured make-sized-byte-string would be the best way to extract the
string, but I don't have the pointer to the beginning of the string
necessary to pass to that function. Maybe I'm going about this the
wrong way, but if I'm not, would it make sense for there to be
'type-slot-pointer' functions generated in addition to the 'type-slot'
functions, with define-cstruct? Or maybe I didn't notice some other
way to get the pointer to the start of the struct (without doing my
own pointer arithmetic...).

 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+            http://radix.twistedmatrix.com

Posted on the users mailing list.