[racket] Sending a cvector to foreign functions.

From: Lewis (lewis1711 at gmail.com)
Date: Tue Jan 25 02:09:01 EST 2011

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/

Here are the relevant bits of racket code, including the error. I
would much appreciate if anyone could tell me if I am doing something
obviously wrong.

The main ithing I am confused about is... *how do I send a information
from racket to a C function that expects an array*

Thanks,
Lewis

> On 25/01/2011, Noel Welsh <noelwelsh at gmail.com> wrote:
>> 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 <lewis1711 at gmail.com> 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, whenever I try and send a cvector of type Tile into it,
>>> I get the error
>>>
>>> SIGSEGV MAPERR si_code 1 fault on addr 0x100004
>>
>


Posted on the users mailing list.