summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index aaefa2d..871eea3 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -796,7 +796,7 @@ complex_richcompare(PyObject *v, PyObject *w, int op)
* NotImplemented. Only comparisons with core numeric types raise
* TypeError.
*/
- if (PyInt_Check(w) || PyLong_Check(w) ||
+ if (_PyAnyInt_Check(w) ||
PyFloat_Check(w) || PyComplex_Check(w)) {
PyErr_SetString(PyExc_TypeError,
"no ordering relation is defined "
@@ -809,7 +809,7 @@ complex_richcompare(PyObject *v, PyObject *w, int op)
assert(PyComplex_Check(v));
TO_COMPLEX(v, i);
- if (PyInt_Check(w) || PyLong_Check(w)) {
+ if (_PyAnyInt_Check(w)) {
/* Check for 0.0 imaginary part first to avoid the rich
* comparison when possible.
*/