mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Fix the array tests. Only a minor change to the C code was required.
This commit is contained in:
parent
bce56a6c5b
commit
1f05a3b7fb
2 changed files with 15 additions and 17 deletions
|
@ -104,7 +104,9 @@ in bounds; that's the responsibility of the caller.
|
|||
static PyObject *
|
||||
c_getitem(arrayobject *ap, Py_ssize_t i)
|
||||
{
|
||||
return PyString_FromStringAndSize(&((char *)ap->ob_item)[i], 1);
|
||||
Py_UNICODE buf[1];
|
||||
buf[0] = ((unsigned char *)ap->ob_item)[i];
|
||||
return PyUnicode_FromUnicode(buf, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue