diff options
Diffstat (limited to 'Modules/_functoolsmodule.c')
-rw-r--r-- | Modules/_functoolsmodule.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 567300e3f3..da1d2e16db 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -529,15 +529,8 @@ keyobject_richcompare(PyObject *ko, PyObject *other, int op) PyObject *y; PyObject *compare; PyObject *answer; - static PyObject *zero; PyObject* stack[2]; - if (zero == NULL) { - zero = PyLong_FromLong(0); - if (!zero) - return NULL; - } - if (Py_TYPE(other) != &keyobject_type){ PyErr_Format(PyExc_TypeError, "other argument must be K instance"); return NULL; @@ -561,7 +554,7 @@ keyobject_richcompare(PyObject *ko, PyObject *other, int op) return NULL; } - answer = PyObject_RichCompare(res, zero, op); + answer = PyObject_RichCompare(res, _PyLong_Zero, op); Py_DECREF(res); return answer; } |