mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Py_BuildValue's 'c' code should use byte strings #5666
This commit is contained in:
parent
a3b1ac8dca
commit
a921fb0f66
4 changed files with 11 additions and 7 deletions
|
@ -289,7 +289,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
|
|||
{
|
||||
char p[1];
|
||||
p[0] = (char)va_arg(*p_va, int);
|
||||
return PyUnicode_FromStringAndSize(p, 1);
|
||||
return PyBytes_FromStringAndSize(p, 1);
|
||||
}
|
||||
case 'C':
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue