diff options
author | Guido van Rossum <guido@python.org> | 2007-05-10 18:41:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-10 18:41:30 (GMT) |
commit | 1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6 (patch) | |
tree | 80e996a1eb310fa5bd108d4e0f7a2524bd0fea4f /Modules | |
parent | bce56a6c5ba368c3cb84da315266ce975005f82c (diff) | |
download | cpython-1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6.zip cpython-1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6.tar.gz cpython-1f05a3b7fb754d6b30300e1e50aeb92aabe6afd6.tar.bz2 |
Fix the array tests. Only a minor change to the C code was required.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index c6de243..a5fd503 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -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 |