Index: Doc/c-api/arg.rst =================================================================== --- Doc/c-api/arg.rst (révision 71045) +++ Doc/c-api/arg.rst (copie de travail) @@ -212,7 +212,7 @@ :ctype:`char`. ``C`` (string of length 1) [int] - Covert a Python character, represented as a unicode string of length 1, to a + Convert a Python character, represented as a unicode string of length 1, to a C :ctype:`int`. ``f`` (float) [float] @@ -511,8 +511,12 @@ Convert a C :ctype:`Py_ssize_t` to a Python integer. ``c`` (string of length 1) [char] - Convert a C :ctype:`int` representing a character to a Python string of length - 1. + Convert a C :ctype:`int` representing a byte to a Python byte string of + length 1. + + ``C`` (string of length 1) [int] + Convert a C :ctype:`int` representing a character to Python unicode + string of length 1. ``d`` (float) [double] Convert a C :ctype:`double` to a Python floating point number. Index: Python/modsupport.c =================================================================== --- Python/modsupport.c (révision 71045) +++ Python/modsupport.c (copie de travail) @@ -289,7 +289,7 @@ { char p[1]; p[0] = (char)va_arg(*p_va, int); - return PyUnicode_FromStringAndSize(p, 1); + return PyBytes_FromStringAndSize(p, 1); } case 'C': { Index: Modules/arraymodule.c =================================================================== --- Modules/arraymodule.c (révision 71045) +++ Modules/arraymodule.c (copie de travail) @@ -1141,14 +1141,14 @@ > PY_SSIZE_T_MAX / Py_SIZE(array)) { return PyErr_NoMemory(); } - result = Py_BuildValue("O(cy#)O", + result = Py_BuildValue("O(Cy#)O", Py_TYPE(array), array->ob_descr->typecode, array->ob_item, Py_SIZE(array) * array->ob_descr->itemsize, dict); } else { - result = Py_BuildValue("O(c)O", + result = Py_BuildValue("O(C)O", Py_TYPE(array), array->ob_descr->typecode, dict); Index: Modules/_cursesmodule.c =================================================================== --- Modules/_cursesmodule.c (révision 71045) +++ Modules/_cursesmodule.c (copie de travail) @@ -890,7 +890,7 @@ 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));