[racket-dev] sharing cpointers between namespaces

From: John Clements (clements at brinckerhoff.org)
Date: Fri Oct 29 15:44:45 EDT 2010

On Oct 29, 2010, at 7:21 AM, Matthew Flatt wrote:

> At Thu, 28 Oct 2010 14:46:30 -0700, John Clements wrote:
>> Specifically, I moved the define-struct of cpointer into a module by itself, 
>> called ffi/unsafe/cvector-def; that way, my tool.rkt file can require this 
>> one-line module and attach it to the user's namespace using 'reset-console'.
>> 
>> BUT: the cvector.rkt file wants to use "protect-out" to prevent others from 
>> using make-cvector explicitly, and I'm not sure how to do this after moving 
>> the structure definition into another file.
> 
> Did you use `protect-out' to export from the new file? That should be
> all you need to do, unless I misunderstand.

Ah! I was under the impression that something exported using "protect-out" could *only* be used as part of a certified macro expansion. I see that I was wrong.   I've updated the docs slightly, in the push that I just made.  Let me know if I'm making incorrect assumptions.

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/20101029/476ea7a6/attachment.p7s>

Posted on the dev mailing list.