Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8934fc2

Browse files
committed
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.
1 parent dd5a860 commit 8934fc2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Modules/arraymodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,6 @@ array_fromfile(arrayobject *self, PyObject *args)
12081208
}
12091209

12101210
if (PyBytes_GET_SIZE(b) != nbytes) {
1211-
printf("nbytes = %d, len(b) == %d\n", nbytes, PyBytes_GET_SIZE(b));
12121211
PyErr_SetString(PyExc_EOFError,
12131212
"read() didn't return enough bytes");
12141213
Py_DECREF(b);
@@ -1779,7 +1778,7 @@ static PyBufferProcs array_as_buffer = {
17791778
static PyObject *
17801779
array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
17811780
{
1782-
char c;
1781+
int c;
17831782
PyObject *initial = NULL, *it = NULL;
17841783
struct arraydescr *descr;
17851784

0 commit comments

Comments
 (0)