'int' is enough for 'length' to migrate code from x86 to x64

Frank Like via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 19 01:06:15 PST 2014


> Clearly size_t (which I tend to alias with ℕ in my code for
> brevity and coolness) can express more than 2^31-1 items, which
> is appropriate to reflect the increase in usable memory per
> application on 64-bit platforms. Yes, the 64-bit version of a
> program or library can handle larger data sets. Just like it

I known it.

but if you compile the dfl Library to 64 bit,you will find error:

core.sys.windows.windows.WaitForMultipleObjects(uint 
nCount,void** lpHandles,....) is not callable using argument 
types(ulong,void**,...)

the 'WaitForMultipleObjects' Function is in 
dmd2/src/druntime/src/core/sys/windows/windows.d

the argument of first is dfl's value ,it come from a 'length' 
,it's type is size_t,now it is 'ulong' on 64 bit.

So druntime must keep the same as  phobos for size_t.




More information about the Digitalmars-d mailing list