Message 188142 - Python tracker (original) (raw)

It is the same question than yours: is there a platform with an integer type wider than a pointer (intptr_t/void*)?

It's x86. sizeof(void*) == 4, sizeof(long long) == 8.

Ah yes. So "SIZEOF_VOID_P <=" is not a good test. File position (off_t) size can be 64 bit on a 32-bit system (like Linux/i386 and Win32), whereas pointers size is 32 bit.

I don't think that we can rely on the availability of PY_LONG_LONG, it may depend on the compiler or even on the compiler options.

IMO, if we decide to add functions for intmax_t and uintmax_t types, the safest option is to only define functions if the real C type (intmax_t and uintmax_t types) is available. I mean, we should not guess intmax_t ourself, or we may choose the wrong type (too small type).