2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Python 2.5 compatibility

[SVN r34017]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2006-05-18 22:41:14 +00:00
parent 66ac61450e
commit caa9cb8268
9 changed files with 45 additions and 19 deletions

View File

@@ -106,7 +106,7 @@ namespace // slicing code copied directly out of the Python implementation
PySequenceMethods *sq = tp->tp_as_sequence;
if (sq && sq->sq_slice && ISINT(v) && ISINT(w)) {
int ilow = 0, ihigh = INT_MAX;
Py_ssize_t ilow = 0, ihigh = PY_SSIZE_T_MAX;
if (!_PyEval_SliceIndex(v, &ilow))
return NULL;
if (!_PyEval_SliceIndex(w, &ihigh))
@@ -133,7 +133,7 @@ namespace // slicing code copied directly out of the Python implementation
PySequenceMethods *sq = tp->tp_as_sequence;
if (sq && sq->sq_slice && ISINT(v) && ISINT(w)) {
int ilow = 0, ihigh = INT_MAX;
Py_ssize_t ilow = 0, ihigh = PY_SSIZE_T_MAX;
if (!_PyEval_SliceIndex(v, &ilow))
return -1;
if (!_PyEval_SliceIndex(w, &ihigh))