diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 12:58:54 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 12:58:54 -0600 |
commit | a6eb5ff3eee515f6a800f3a65e3e4a7ffbde7eb4 (patch) | |
tree | 250fa93719b6a42b17929c0ad63084ba566521f7 | |
parent | 4e4a16eaba3d7663b1678991a49754997b332a52 (diff) | |
download | cpython-a6eb5ff3eee515f6a800f3a65e3e4a7ffbde7eb4.tar.gz |
remove strange casts
-rw-r--r-- | Objects/intobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index 28182f93db..654d2fe120 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -208,7 +208,7 @@ PyInt_AsSsize_t(register PyObject *op) { #if SIZEOF_SIZE_T != SIZEOF_LONG PyNumberMethods *nb; - PyIntObject *io; + PyObject *io; Py_ssize_t val; #endif @@ -232,15 +232,15 @@ PyInt_AsSsize_t(register PyObject *op) } if (nb->nb_long != 0) - io = (PyIntObject*) (*nb->nb_long) (op); + io = (*nb->nb_long)(op); else - io = (PyIntObject*) (*nb->nb_int) (op); + io = (*nb->nb_int)(op); if (io == NULL) return -1; if (!PyInt_Check(io)) { if (PyLong_Check(io)) { /* got a long? => retry int conversion */ - val = _PyLong_AsSsize_t((PyObject *)io); + val = _PyLong_AsSsize_t(io); Py_DECREF(io); if ((val == -1) && PyErr_Occurred()) return -1; |