size_t + ptrdiff_t
sean at invisibleduck.org
Mon Feb 20 11:51:30 PST 2012
On Feb 20, 2012, at 11:43 AM, Manu wrote:
> On 20 February 2012 19:21, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
> OK, I'm just having a trudge through druntime:
> intptr_t and uintptr_t are guaranteed to match pointer size.
> c_long and c_ulong are guaranteed to match target long size (here
> would also go c_int and c_uint ;-).
> This needs fixing, as wchar_t may not be same size across all targets
> (some change size of wchar_t based on compile time switches).
> This needs fixing, as wint_t may not be same size across all targets.
> Iain Buclaw
> *(p < e ? p++ : p) = (c & 0x0f) + '0';
> It seems the problem is already MUCH worse than in D already :( .. this was precisely my fear.
> Why all these redundant aliases? Just for C compatibility?
core.stdc is an interface to the C99 API, so everything is preserved verbatim. c_long and c_ulong were added because the size of C long differs between Windows and non-Windows x86_64 platforms. Typically, int, short, etc are the same however, which is why there's currently no c_int--it was just a needless complication at the time. The aliases for D users, if the exist at all, should be separate.
More information about the Digitalmars-d