Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread p...@highoctane.be
A C long is guaranteed to be at least 32 bits in size. long long is guaranteed to be 64 bits. int depends on the platform. Phil On Thu, Apr 19, 2018 at 10:30 AM, Andres Valloud < avall...@smalltalk.comcastbiz.net> wrote: > The relevant spec does not state 'long' is of any particular size. > >

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread p...@highoctane.be
On Thu, Apr 19, 2018 at 10:32 AM, Thierry Goubier wrote: > > > 2018-04-19 10:24 GMT+02:00 Serge Stinckwich : > >> >> >> On Thu, Apr 19, 2018 at 9:13 AM, Serge Stinckwich < >> serge.stinckw...@gmail.com> wrote: >> >>> I try to understand differences between 32 bits and 64 bits FFI support >>> for

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread Serge Stinckwich
On Thu, Apr 19, 2018 at 9:30 AM, Andres Valloud < avall...@smalltalk.comcastbiz.net> wrote: > The relevant spec does not state 'long' is of any particular size. > > ​yes I know this is why we have also a platformLongAt: method. I was just wondering, why we have a signedLongAt: method that return

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread Thierry Goubier
signed long is now specified as: Capable of containing at least the [−2,147,483,647, +2,147,483,647] range; so at least 32 bits; and signed long long Capable of containing at least the [−9,223,372,036,854,775,807, +9,223,372,036,854,775,807] range [C99] so at least 64 bits; and long long siz

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread Thierry Goubier
2018-04-19 10:24 GMT+02:00 Serge Stinckwich : > > > On Thu, Apr 19, 2018 at 9:13 AM, Serge Stinckwich < > serge.stinckw...@gmail.com> wrote: > >> I try to understand differences between 32 bits and 64 bits FFI support >> for C structures. >> >> I build a class called MyStruct subclass of FFIExtern

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread Andres Valloud
The relevant spec does not state 'long' is of any particular size. On 4/19/18 1:24 , Serge Stinckwich wrote: On Thu, Apr 19, 2018 at 9:13 AM, Serge Stinckwich mailto:serge.stinckw...@gmail.com>> wrote: I try to understand differences between 32 bits and 64 bits FFI support for C struc

Re: [Pharo-users] C struct in 32 bits vs 64 bits VM

2018-04-19 Thread Serge Stinckwich
On Thu, Apr 19, 2018 at 9:13 AM, Serge Stinckwich < serge.stinckw...@gmail.com> wrote: > I try to understand differences between 32 bits and 64 bits FFI support > for C structures. > > I build a class called MyStruct subclass of FFIExternalStructure. > and define a layout for this structure like t