summaryrefslogtreecommitdiff
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-12-04 22:10:37 +0000
commitfa2bc728a4b66cf93192dab05b0422874093b257 (patch)
tree9255f32d384a51f8d8c6d0eb152c5bbf67ddb1aa /Python/ceval.c
parentee4c1b8e23875dc013936922550518fb655b27fa (diff)
downloadcpython-fa2bc728a4b66cf93192dab05b0422874093b257.tar.gz
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 9aa83c74e7..813f6f636a 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;