summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-31 08:56:48 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-31 08:56:48 (GMT)
commitdc967c137cb5e2e0f558cedbb94a13256db3fb75 (patch)
tree99414d26fe79904cfa78733ab216eb74da5e09bb /Modules/arraymodule.c
parent062bed289bd2806815203add22d134762bcfbcc3 (diff)
downloadcpython-dc967c137cb5e2e0f558cedbb94a13256db3fb75.zip
cpython-dc967c137cb5e2e0f558cedbb94a13256db3fb75.tar.gz
cpython-dc967c137cb5e2e0f558cedbb94a13256db3fb75.tar.bz2
Fixed the array module in unicode disabled build (regression of issue20014).
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index c37644d..3ed8a33 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1940,8 +1940,10 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (PyString_Check(typecode) && PyString_GET_SIZE(typecode) == 1)
c = (unsigned char)*PyString_AS_STRING(typecode);
+#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(typecode) && PyUnicode_GET_SIZE(typecode) == 1)
c = *PyUnicode_AS_UNICODE(typecode);
+#endif
else {
PyErr_Format(PyExc_TypeError,
"array() argument 1 or typecode must be char (string or "