[plt-scheme] FFI - Implicit binding of _int to the correct _int32 or _int64

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Sep 26 19:26:57 EDT 2007

On Sep 26, Matthew Flatt wrote:
> 
> I think `int' normally means 32 bits on both 32-bt and 64-bit
> machines.  So, if a C prototype says `int', I'd expect `_int' to be
> the right FFI choice. Unlike `int', the `long' type's size normally
> varies.

That's exactly what happens, and you (Ray) can verify this by trying
this:

  printf("%d %d\n", sizeof(int), sizeof(long));

on the 64bit machine.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.