diff options
Diffstat (limited to 'PC/msvcrtmodule.c')
-rwxr-xr-x | PC/msvcrtmodule.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 166df036f2d..e5a0a177bc1 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -212,7 +212,6 @@ static PyObject * msvcrt_getwch(PyObject *self, PyObject *args) { Py_UNICODE ch; - Py_UNICODE u[1]; if (!PyArg_ParseTuple(args, ":getwch")) return NULL; @@ -220,8 +219,7 @@ msvcrt_getwch(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS ch = _getwch(); Py_END_ALLOW_THREADS - u[0] = ch; - return PyUnicode_FromUnicode(u, 1); + return PyUnicode_FromOrdinal(ch); } PyDoc_STRVAR(getwch_doc, @@ -257,7 +255,6 @@ static PyObject * msvcrt_getwche(PyObject *self, PyObject *args) { Py_UNICODE ch; - Py_UNICODE s[1]; if (!PyArg_ParseTuple(args, ":getwche")) return NULL; @@ -265,8 +262,7 @@ msvcrt_getwche(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS ch = _getwche(); Py_END_ALLOW_THREADS - s[0] = ch; - return PyUnicode_FromUnicode(s, 1); + return PyUnicode_FromOrdinal(ch); } PyDoc_STRVAR(getwche_doc, |