summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-03 22:18:11 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-03 22:18:11 (GMT)
commita921fb0f66e082a61277e97e1326a26fa59be3f0 (patch)
tree5f9897b1acee7cbf88c253003e62fc7f79824aae /Modules
parenta3b1ac8dca5afa01d9d542e125052014a9af56eb (diff)
downloadcpython-a921fb0f66e082a61277e97e1326a26fa59be3f0.zip
cpython-a921fb0f66e082a61277e97e1326a26fa59be3f0.tar.gz
cpython-a921fb0f66e082a61277e97e1326a26fa59be3f0.tar.bz2
Py_BuildValue's 'c' code should use byte strings #5666
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c2
-rw-r--r--Modules/arraymodule.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 9bc74a6..5cb198e 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -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));
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index b39da8e..6dc46ad 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1141,14 +1141,14 @@ array_reduce(arrayobject *array)
> 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);