projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1c67d1
)
array_tounicode isn't defined in --disable-unicode builds...
author
Michael W. Hudson
<mwh@python.net>
Mon, 13 May 2002 10:14:59 +0000
(10:14 +0000)
committer
Michael W. Hudson
<mwh@python.net>
Mon, 13 May 2002 10:14:59 +0000
(10:14 +0000)
I have a patch to make the test work too, but it's not pretty so
I'll submit it to sf.
Modules/arraymodule.c
patch
|
blob
|
history
diff --git
a/Modules/arraymodule.c
b/Modules/arraymodule.c
index 8d3e026153ff09f1b849ade810fbd1e71049df24..f10d442fb9d9666db1383796ad216237ab6101ad 100644
(file)
--- a/
Modules/arraymodule.c
+++ b/
Modules/arraymodule.c
@@
-1447,10
+1447,14
@@
array_repr(arrayobject *a)
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);