summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-30 23:44:36 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-30 23:44:36 (GMT)
commit8934fc26c17f6a24d3643e1d4cce6e7ec341e92f (patch)
tree2e67fc530b50c1abc00680dd13edd0bac013f0db /Modules
parentdd5a86070cdd636dd0def3fd5900b0b8405f0b6b (diff)
downloadcpython-8934fc26c17f6a24d3643e1d4cce6e7ec341e92f.zip
cpython-8934fc26c17f6a24d3643e1d4cce6e7ec341e92f.tar.gz
cpython-8934fc26c17f6a24d3643e1d4cce6e7ec341e92f.tar.bz2
Fix a failure that was only apparent on big-endian machines:
the argument corresponding to 'c' in PyArg_ParseTuple() must be an int, not a char! (This is new -- Walter Doerwald changed it in r56044. Note sure this was a good idea.) Also removed a debug printf() call that was causing compiler warnings.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/arraymodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 585ed2f..6c9038a 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1208,7 +1208,6 @@ array_fromfile(arrayobject *self, PyObject *args)
}
if (PyBytes_GET_SIZE(b) != nbytes) {
- printf("nbytes = %d, len(b) == %d\n", nbytes, PyBytes_GET_SIZE(b));
PyErr_SetString(PyExc_EOFError,
"read() didn't return enough bytes");
Py_DECREF(b);
@@ -1779,7 +1778,7 @@ static PyBufferProcs array_as_buffer = {
static PyObject *
array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- char c;
+ int c;
PyObject *initial = NULL, *it = NULL;
struct arraydescr *descr;