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 w
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.
Your code looks correct to me. Things you might try:
- Check tiles are constructed correctly
- Replace _cvector with (_cvector i _tile) for increased error checking
Sorry I can't be more helpful. These problems are really hard to debug
as the errors could be in so many places.
N.
On Tue, Jan 25
Right you are Noel it turns out the C code had a few bugs of its own.
I have independently tested it now, and all is working fine from
there.
The C prototype is now
void render(int x_camera, int y_camera, Visual pc, Tile* world);
However I still get the error.
http://paste.pocoo.org/show/326448
It is really hard to say (and debug). Have you independently tested the C code?
N.
On Mon, Jan 24, 2011 at 5:50 AM, Lewis wrote:
> Greetings,
>
> I am trying to send a racket cvector to a C function in a lib I a
> writing. The C function in question has the prototype
>
...
>
> Unfortunately, whe
Greetings,
I am trying to send a racket cvector to a C function in a lib I a
writing. The C function in question has the prototype
void render(int x_camera, int y_camera, Visual pc, Tile **world);
The important bit is the last argument, Tile **world. I have
registered this in racket as
(define
6 matches
Mail list logo