summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-04-13 07:52:27 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-04-13 07:52:27 +0000
commitb1ed7fac12fe51080c06e518a9fcaa21f0734744 (patch)
tree62ec01511606af98540d5b78bb24b2b848f4064e /Python/codecs.c
parent2a19074a9c58d491712139cd3607c10fddebbebc (diff)
downloadcpython-git-b1ed7fac12fe51080c06e518a9fcaa21f0734744.tar.gz
Replace INT_MAX with PY_SSIZE_T_MAX.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index e2bb8fcbbf..2124824f6c 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -56,12 +56,12 @@ PyObject *normalizestring(const char *string)
char *p;
PyObject *v;
- if (len > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError, "string is too large");
- return NULL;
- }
+ if (len > PY_SSIZE_T_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "string is too large");
+ return NULL;
+ }
- v = PyString_FromStringAndSize(NULL, (int)len);
+ v = PyString_FromStringAndSize(NULL, len);
if (v == NULL)
return NULL;
p = PyString_AS_STRING(v);