mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
e1c67d1dc0
commit
1755ad9b02
1 changed files with 4 additions and 0 deletions
|
@ -1447,10 +1447,14 @@ array_repr(arrayobject *a)
|
||||||
PyObject *t_empty = PyTuple_New(0);
|
PyObject *t_empty = PyTuple_New(0);
|
||||||
PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode);
|
PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode);
|
||||||
s = PyString_FromString(buf);
|
s = PyString_FromString(buf);
|
||||||
|
#ifdef Py_USING_UNICODE
|
||||||
if (typecode == 'c')
|
if (typecode == 'c')
|
||||||
|
#endif
|
||||||
v = array_tostring(a, t_empty);
|
v = array_tostring(a, t_empty);
|
||||||
|
#ifdef Py_USING_UNICODE
|
||||||
else
|
else
|
||||||
v = array_tounicode(a, t_empty);
|
v = array_tounicode(a, t_empty);
|
||||||
|
#endif
|
||||||
Py_DECREF(t_empty);
|
Py_DECREF(t_empty);
|
||||||
t = PyObject_Repr(v);
|
t = PyObject_Repr(v);
|
||||||
Py_XDECREF(v);
|
Py_XDECREF(v);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue