File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,18 +220,12 @@ msvcrt_putch(PyObject *self, PyObject *args)
220220static PyObject *
221221msvcrt_putwch (PyObject * self , PyObject * args )
222222{
223- Py_UNICODE * ch ;
224- int size ;
223+ int ch ;
225224
226- if (!PyArg_ParseTuple (args , "u# :putwch" , & ch , & size ))
225+ if (!PyArg_ParseTuple (args , "C :putwch" , & ch ))
227226 return NULL ;
228227
229- if (size == 0 ) {
230- PyErr_SetString (PyExc_ValueError ,
231- "Expected unicode string of length 1" );
232- return NULL ;
233- }
234- _putwch (* ch );
228+ _putwch (ch );
235229 Py_RETURN_NONE ;
236230
237231}
@@ -255,12 +249,12 @@ msvcrt_ungetch(PyObject *self, PyObject *args)
255249static PyObject *
256250msvcrt_ungetwch (PyObject * self , PyObject * args )
257251{
258- Py_UNICODE ch ;
252+ int ch ;
259253
260- if (!PyArg_ParseTuple (args , "u :ungetwch" , & ch ))
254+ if (!PyArg_ParseTuple (args , "C :ungetwch" , & ch ))
261255 return NULL ;
262256
263- if (_ungetch (ch ) == EOF )
257+ if (_ungetwch (ch ) == WEOF )
264258 return PyErr_SetFromErrno (PyExc_IOError );
265259 Py_INCREF (Py_None );
266260 return Py_None ;
You can’t perform that action at this time.
0 commit comments