[racket-dev] sharing cpointers between namespaces

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Oct 29 10:21:50 EDT 2010

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.



Posted on the dev mailing list.