comparison 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
comparison
equal deleted inserted replaced
23432:56240bcda88c 23433:fb64f21176af
1445 1445
1446 if (typecode == 'c' || typecode == 'u') { 1446 if (typecode == 'c' || typecode == 'u') {
1447 PyObject *t_empty = PyTuple_New(0); 1447 PyObject *t_empty = PyTuple_New(0);
1448 PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode); 1448 PyOS_snprintf(buf, sizeof(buf), "array('%c', ", typecode);
1449 s = PyString_FromString(buf); 1449 s = PyString_FromString(buf);
1450 #ifdef Py_USING_UNICODE
1450 if (typecode == 'c') 1451 if (typecode == 'c')
1452 #endif
1451 v = array_tostring(a, t_empty); 1453 v = array_tostring(a, t_empty);
1454 #ifdef Py_USING_UNICODE
1452 else 1455 else
1453 v = array_tounicode(a, t_empty); 1456 v = array_tounicode(a, t_empty);
1457 #endif
1454 Py_DECREF(t_empty); 1458 Py_DECREF(t_empty);
1455 t = PyObject_Repr(v); 1459 t = PyObject_Repr(v);
1456 Py_XDECREF(v); 1460 Py_XDECREF(v);
1457 PyString_ConcatAndDel(&s, t); 1461 PyString_ConcatAndDel(&s, t);
1458 PyString_ConcatAndDel(&s, PyString_FromString(")")); 1462 PyString_ConcatAndDel(&s, PyString_FromString(")"));