From: Martin v. Löwis Date: Thu, 13 Apr 2006 07:34:09 +0000 (+0000) Subject: Replace INT_MAX with PY_SSIZE_T_MAX. X-Git-Tag: v2.5a2~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2308915b2f3114a592e51053ca788dcb7d0a2541;p=python Replace INT_MAX with PY_SSIZE_T_MAX. --- diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index c1ad43a2f8..8b00fed69a 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c @@ -333,7 +333,7 @@ strop_rfind(PyObject *self, PyObject *args) { char *s, *sub; Py_ssize_t len, n, j; - Py_ssize_t i = 0, last = INT_MAX; + Py_ssize_t i = 0, last = PY_SSIZE_T_MAX; WARN; if (!PyArg_ParseTuple(args, "t#t#|nn:rfind", &s, &len, &sub, &n, &i, &last)) @@ -647,7 +647,7 @@ strop_count(PyObject *self, PyObject *args) { char *s, *sub; Py_ssize_t len, n; - Py_ssize_t i = 0, last = INT_MAX; + Py_ssize_t i = 0, last = PY_SSIZE_T_MAX; Py_ssize_t m, r; WARN; @@ -1078,7 +1078,7 @@ mymemreplace(const char *str, Py_ssize_t len, /* input string */ /* find length of output string */ nfound = mymemcnt(str, len, pat, pat_len); if (count < 0) - count = INT_MAX; + count = PY_SSIZE_T_MAX; else if (nfound > count) nfound = count; if (nfound == 0)