From 460bd0d284caa00eb8ccc9a28836ba30765a19cb Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 20 Nov 2016 12:16:46 +0200 Subject: Issue #19569: Compiler warnings are now emitted if use most of deprecated functions. --- Modules/arraymodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/arraymodule.c') diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 2caa8ee5a8e..a68db18b0f2 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 @@ -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] -- cgit v1.2.3