summaryrefslogtreecommitdiff
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 2caa8ee5a8..f1469df4c9 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -236,7 +236,7 @@ BB_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
static PyObject *
u_getitem(arrayobject *ap, Py_ssize_t i)
{
- return PyUnicode_FromUnicode(&((Py_UNICODE *) ap->ob_item)[i], 1);
+ return PyUnicode_FromOrdinal(((Py_UNICODE *) ap->ob_item)[i]);
}
static int
@@ -1445,7 +1445,7 @@ array_array_tofile(arrayobject *self, PyObject *f)
bytes = PyBytes_FromStringAndSize(ptr, size);
if (bytes == NULL)
return NULL;
- res = _PyObject_CallMethodId(f, &PyId_write, "O", bytes);
+ res = _PyObject_CallMethodIdObjArgs(f, &PyId_write, bytes, NULL);
Py_DECREF(bytes);
if (res == NULL)
return NULL;
@@ -1693,7 +1693,7 @@ array_array_tounicode_impl(arrayobject *self)
"tounicode() may only be called on unicode type arrays");
return NULL;
}
- return PyUnicode_FromUnicode((Py_UNICODE *) self->ob_item, Py_SIZE(self));
+ return PyUnicode_FromWideChar((Py_UNICODE *) self->ob_item, Py_SIZE(self));
}
/*[clinic input]