mirror of
https://github.com/python/cpython.git
synced 2025-11-10 18:42:04 +00:00
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.
This commit is contained in:
parent
dd5a86070c
commit
8934fc26c1
1 changed files with 1 additions and 2 deletions
|
|
@ -1208,7 +1208,6 @@ array_fromfile(arrayobject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PyBytes_GET_SIZE(b) != nbytes) {
|
if (PyBytes_GET_SIZE(b) != nbytes) {
|
||||||
printf("nbytes = %d, len(b) == %d\n", nbytes, PyBytes_GET_SIZE(b));
|
|
||||||
PyErr_SetString(PyExc_EOFError,
|
PyErr_SetString(PyExc_EOFError,
|
||||||
"read() didn't return enough bytes");
|
"read() didn't return enough bytes");
|
||||||
Py_DECREF(b);
|
Py_DECREF(b);
|
||||||
|
|
@ -1779,7 +1778,7 @@ static PyBufferProcs array_as_buffer = {
|
||||||
static PyObject *
|
static PyObject *
|
||||||
array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
{
|
{
|
||||||
char c;
|
int c;
|
||||||
PyObject *initial = NULL, *it = NULL;
|
PyObject *initial = NULL, *it = NULL;
|
||||||
struct arraydescr *descr;
|
struct arraydescr *descr;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue