diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 51f4c388fe6..7847d3934ff 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2284,9 +2284,7 @@ PyCurses_TypeAhead(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args,"i;fd",&fd)) return NULL; - PyCursesCheckERR(typeahead( fd ), "typeahead"); - Py_INCREF(Py_None); - return Py_None; + return PyCursesCheckERR(typeahead( fd ), "typeahead"); } static PyObject *