[racket-dev] [racket] newbie: foreign C structure definition question

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Nov 16 23:56:55 EST 2010

[redirected to dev@]

On Tue, Nov 16, 2010 at 11:28 PM, Eli Barzilay <eli at barzilay.org> wrote:
> 20 minutes ago, Jay McCarthy wrote:
>>
>> I've complained about this before, which is why I was able to
>> quickly answer your question. I don't endorse the current behavior.
>
> (Just a reminder: this is something that libffi doesn't have AFAICT.)

Python's 'ctypes' library, which also uses libffi under the hood, has arrays:
  http://docs.python.org/library/ctypes.html#arrays
and also unions, which we don't have:
  http://docs.python.org/library/ctypes.html#structures-and-unions

So it seems like this should be possible, and maybe we can even use their code.
-- 
sam th
samth at ccs.neu.edu


Posted on the dev mailing list.