Travis E. Oliphant wrote: > Why not just > > #if SIZEOF_SIZE_T == 2 > #define PY_SSIZE_T_MAX 0x7fff > #elif SIZEOF_SIZE_T == 4 > #define PY_SSIZE_T_MAX 0x7fffffff > #elif SIZEOF_SIZE_T == 8 > #define PY_SSIZE_T_MAX 0x7fffffffffffffff > #elif SIZEOF_SIZE_T == 16 > #define PY_SSIZE_T_MAX 0x7fffffffffffffffffffffffffffffff > #endif
That would not work: 0x7fffffffffffffff is not a valid integer literal. 0x7fffffffffffffffL might work, or 0x7fffffffffffffffLL, or 0x7fffffffffffffffi64. Which of these is correct depends on the compiler. How to spell 128-bit integral constants, I don't know; it appears that MS foresees a i128 suffix for them. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com