On 21 January 2012 22:18, Timon Gehr <[email protected]> wrote: > On 01/21/2012 09:06 PM, Alex Rønne Petersen wrote: > >> Hi, >> >> I needed a native-size signed integer type this other day and was just >> kinda wondering: Why don't we have this in object.di? isize_t or whatever? >> >> (I have a feeling this has been asked before, but my search-fu is weak >> today seemingly...) >> >> > .object.ptrdiff_t >
I don't necessarily think ptrdiff_t and signed size_t are the same thing. Surely size_t should represent the systems native word width? ptrdiff_t represents the size of a pointer, which is NOT necessarily the same as the native word width. There are quite a few 64 bit systems that retain 32bit pointers. I would thing ssize_t is safer than using ptrdiff_t, and certainly, both should exist.
