Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1755ad9

Browse files
author
Michael W. Hudson
committed
array_tounicode isn't defined in --disable-unicode builds...
I have a patch to make the test work too, but it's not pretty so I'll submit it to sf.
1 parent e1c67d1 commit 1755ad9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/arraymodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,10 +1447,14 @@ array_repr(arrayobject *a)
14471447
PyObject *t_empty = PyTuple_New(0);
14481448
PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode);
14491449
s = PyString_FromString(buf);
1450+
#ifdef Py_USING_UNICODE
14501451
if (typecode == 'c')
1452+
#endif
14511453
v = array_tostring(a, t_empty);
1454+
#ifdef Py_USING_UNICODE
14521455
else
14531456
v = array_tounicode(a, t_empty);
1457+
#endif
14541458
Py_DECREF(t_empty);
14551459
t = PyObject_Repr(v);
14561460
Py_XDECREF(v);

0 commit comments

Comments
 (0)