static PyObject * msvcrt_ungetch_impl(PyModuleDef *module, char char_value) /*[clinic end generated code: output=19a4cd3249709ec9 input=22f07ee9001bbf0f]*/ { if (_ungetch(char_value) == EOF) return PyErr_SetFromErrno(PyExc_IOError); Py_RETURN_NONE; }
static PyObject *msvcrt_ungetch(PyObject *self, PyObject *args) { char ch; if (!PyArg_ParseTuple(args, "c:ungetch", &ch)) return NULL; if (_ungetch(ch) == EOF) return PyErr_SetFromErrno(PyExc_IOError); Py_INCREF(Py_None); return Py_None; }