Mercurial > cpython-lru_cache-weakref
diff Modules/arraymodule.c @ 23433:fb64f21176af legacy-trunk
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.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Mon, 13 May 2002 10:14:59 +0000 |
| parents | 3efd34fe6668 |
| children | ed1ba37a46b7 |
line wrap: on
line diff
--- a/Modules/arraymodule.c Mon May 13 09:42:16 2002 +0000 +++ b/Modules/arraymodule.c Mon May 13 10:14:59 2002 +0000 @@ -1447,10 +1447,14 @@ PyObject *t_empty = PyTuple_New(0); PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode); s = PyString_FromString(buf); +#ifdef Py_USING_UNICODE if (typecode == 'c') +#endif v = array_tostring(a, t_empty); +#ifdef Py_USING_UNICODE else v = array_tounicode(a, t_empty); +#endif Py_DECREF(t_empty); t = PyObject_Repr(v); Py_XDECREF(v);
