summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 (GMT)
commitd1a1d1ed802187cd1a9a8a95ac5d758c7acffee6 (patch)
tree17489e6ea4df32ba3b3bbda6e4b31155a460f265 /Python/ceval.c
parent0fbab7ff8d2efd92e222fcc13c0aff0998c3c158 (diff)
downloadcpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.zip
cpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.tar.gz
cpython-d1a1d1ed802187cd1a9a8a95ac5d758c7acffee6.tar.bz2
Remove PyInt_CheckExact. Add PyLong_AsLongAndOverflow.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 9aa83c7..813f6f6 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3711,14 +3711,7 @@ _PyEval_SliceIndex(PyObject *v, Py_ssize_t *pi)
{
if (v != NULL) {
Py_ssize_t x;
- if (PyInt_CheckExact(v)) {
- /* XXX(nnorwitz): I think PyLong_AS_LONG is correct,
- however, it looks like it should be AsSsize_t.
- There should be a comment here explaining why.
- */
- x = PyLong_AS_LONG(v);
- }
- else if (PyIndex_Check(v)) {
+ if (PyIndex_Check(v)) {
x = PyNumber_AsSsize_t(v, NULL);
if (x == -1 && PyErr_Occurred())
return 0;