This should work:

_uintptr = size_t
_intptr  = ssize_t

Tobias


On Fri, 08 Feb 2013 20:40:43 +0100, Tony Garnock-Jones <to...@ccs.neu.edu> wrote:

Hi all,

When using Racket's FFI, is there a standard C numeric type
corresponding to size_t? If not, should there be? Many C APIs expose
functions along the lines of

  ... myfunc(..., void *buf, size_t buflen, ...);

and since size_t varies between 32- and 64-bit platforms, I'm unsure
what to supply there.

I note that in collects we have

./db/private/generic/socket.rkt:   (define _size_t _int)
./mred/private/wx/cocoa/image.rkt: (define _size_t _long)
./racket/draw/unsafe/jpeg.rkt:     (define _size_t _intptr)

... of which the last one looks most likely to work properly.

Cheers,
  Tony
____________________
  Racket Users list:
  http://lists.racket-lang.org/users


--
---------------------------------------------------------
Tobias Hammer
DLR / Institute of Robotics and Mechatronics
Muenchner Str. 20, D-82234 Wessling
Tel.: 08153/28-1487
Mail: tobias.ham...@dlr.de
____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to