py: Correctly set sys.maxsize value for 64-bit.

Type representing signed size doesn't have to be int, so use special value
which defaults to SSIZE_MAX, but as it's not defined by C standard (but rather
by POSIX), allow ports to set it.
This commit is contained in:
Paul Sokolovsky
2014-09-06 19:17:23 +03:00
parent 17598d49e1
commit 722e562736
3 changed files with 13 additions and 9 deletions

View File

@@ -52,7 +52,7 @@
#if MICROPY_PY_SYS_MAXSIZE
// Export value for sys.maxsize
const mp_obj_int_t mp_maxsize_obj = {{&mp_type_int}, INT_MAX};
const mp_obj_int_t mp_maxsize_obj = {{&mp_type_int}, MP_SSIZE_MAX};
#endif
mp_int_t mp_obj_int_hash(mp_obj_t self_in) {