size_t + ptrdiff_t

Artur Skawina art.08.09 at
Sun Feb 19 19:44:51 PST 2012

On 02/20/12 04:21, Stewart Gordon wrote:
> On 19/02/2012 23:47, Artur Skawina wrote:
>> On 02/20/12 00:17, Manu wrote:
> <snip>
>>>      core.stdc.stdint.uintptr_t
>>> O_o .. how is this different to size_t now? Why the redundant alias?
>> C compatibility?
> Why would you want to use meaningless type aliases defined in the C headers in D code?

C compatibility?

>> uintptr_t can hold a pointer,
> <snip>
> Why would you want to do that, as opposed to use one of the pointer types (which is indeed required for GC to work correctly)?

That's how it can be used in *C*.

And the reason it needs to be exposed to D code is for interoperability with C.


More information about the Digitalmars-d mailing list