2009/8/7 Andrea Fazzi <andrea.fazzi / alcacoop.it>:
> =A0[...]
> =A0tv_size_ptr =3D FFI::MemoryPointer.new(:int).write_int(tv.size)
>  [...]

Hello,

size_t in ANSI C is required to be unsigned and is usually defined as
unsigned long. Therefore the above code is always wrong in that it
stores a signed integer, and it is likely wrong on some 64 bit systems
where an int is 32 bits wide but a long is 64 bits wide.

cu,
Thomas


--=20
When C++ is your hammer, every problem looks like your thumb.