[racket-dev] FFI problem, possibly related to chaperones

From: John Clements (clements at brinckerhoff.org)
Date: Wed Oct 27 17:47:05 EDT 2010

On Oct 27, 2010, at 9:54 AM, Matthew Flatt wrote:

> I think Robby recently changed DrRacket so that user programs don't
> share `ffi/unsafe' with DrRacket. That would lead to multiple
> `s16vector' structure types (which didn't occur to me when Robby asked
> if it would be ok to not share), and that might be what you're seeing.

Okay, that makes sense.  

I talked to Robby a bit, and it sounds like the issue here is that unsafe pulls in all kinds of other stuff that makes DrRacket big. 

If I read the source correctly, then it would be possible to pull out the one-liner 

(define-struct cvector (ptr type length))

... from unsafe/cvector.rkt and put it somewhere where it can be shared between DrRacket and user programs. It would appear to me that this would produce a single representation for cvectors, and perhaps by extension for the derived s16vector, etc. 

Am I understanding this correctly?

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101027/07eb3216/attachment.p7s>

Posted on the dev mailing list.