Py_BuildValue's 'c' code should use byte strings #5666

This commit is contained in:
Benjamin Peterson 2009-04-03 22:18:11 +00:00
parent a3b1ac8dca
commit a921fb0f66
4 changed files with 11 additions and 7 deletions

View file

@ -890,7 +890,7 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
PyErr_SetString(PyCursesError, "no input");
return NULL;
} else if (rtn<=255)
return Py_BuildValue("c", rtn);
return Py_BuildValue("C", rtn);
else
#if defined(__NetBSD__)
return PyUnicode_FromString(unctrl(rtn));