[racket] Sending a cvector to foreign functions.

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Jan 25 09:21:09 EST 2011

This is an error in Racket that has to do with syntax certificates --
basically protecting certain variables. I think it is used to
implement the (unsafe!) call you have to do to use the FFI. If you
don't have (unsafe!) in your code try adding it. If you do I'll have
to defer to one of the people who understands how syntax certs work.
They should be up now/soon (or you might try IRC).


On Tue, Jan 25, 2011 at 2:13 PM, Lewis <lewis1711 at gmail.com> wrote:
> Interesting, catches it at compile-time now. Though I can make neither
> head nor tail of the error..
> compile: access from an uncertified context to unexported variable
> from module: "/usr/lib/racket/collects/ffi/unsafe/cvector.rkt" in:
> _cvector*
>  === context ===
> /usr/lib/racket/collects/ffi/unsafe.rkt:271:4: loop
> /usr/lib/racket/collects/ffi/unsafe.rkt:320:2
> /usr/lib/racket/collects/ffi/unsafe.rkt:513:2
> /usr/lib/racket/collects/racket/private/map.rkt:18:11: map
> /usr/lib/racket/collects/ffi/unsafe.rkt:557:2: do-fun
> /usr/lib/racket/collects/racket/private/map.rkt:45:11: for-each
> /usr/lib/racket/collects/compiler/embed-unit.rkt:788:4: do-write-module-bundle

Posted on the users mailing list.