diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-09-28 05:41:54 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-09-28 05:41:54 (GMT) |
commit | d63a3b8beb4a0841cb59fb3515347ccaab34b733 (patch) | |
tree | 3b4e3cc63151c5a5a910c3550a190aefaea96ad4 /PC/msvcrtmodule.c | |
parent | 48d49497c50e79d14e9df9527d766ca3a0a38be5 (diff) | |
download | cpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.zip cpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.tar.gz cpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.tar.bz2 |
Implement PEP 393.
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 166df03..e5a0a17 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, |