Implement PEP 393.
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 166df03..e5a0a17 100755
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -212,7 +212,6 @@
msvcrt_getwch(PyObject *self, PyObject *args)
{
Py_UNICODE ch;
- Py_UNICODE u[1];
if (!PyArg_ParseTuple(args, ":getwch"))
return NULL;
@@ -220,8 +219,7 @@
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 @@
msvcrt_getwche(PyObject *self, PyObject *args)
{
Py_UNICODE ch;
- Py_UNICODE s[1];
if (!PyArg_ParseTuple(args, ":getwche"))
return NULL;
@@ -265,8 +262,7 @@
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,