summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-09-06 19:17:23 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-09-06 20:22:06 +0300
commit722e562736f83865333d8b3dd942f903b9db8a7c (patch)
tree5aa17b165bd8393e5add7f6150c9ef09d984c88c /py/mpconfig.h
parent17598d49e1091e2745d8f01288f95007189cdcf5 (diff)
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.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 78c288d7c..633a4a52d 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -448,6 +448,10 @@ typedef double mp_float_t;
#define MP_PLAT_FREE_EXEC(ptr, size) m_del(byte, ptr, size)
#endif
+#ifndef MP_SSIZE_MAX
+#define MP_SSIZE_MAX SSIZE_MAX
+#endif
+
// printf format spec to use for mp_int_t and friends
#ifndef INT_FMT
#ifdef __LP64__