mirror of https://github.com/python/cpython
Use proper PyArg_Parse format char for Py_ssize_t, instead of 'l', in
buffer_new(). Probably fixes a bug in 'buffer("", 10, 10)' on platforms where sizeof(Py_ssize_t) != sizeof(long) (Win64?)
This commit is contained in:
parent
de01774dae
commit
02cbdd3461
|
@ -196,7 +196,7 @@ buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
|||
if (!_PyArg_NoKeywords("buffer()", kw))
|
||||
return NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O|ll:buffer", &ob, &offset, &size))
|
||||
if (!PyArg_ParseTuple(args, "O|nn:buffer", &ob, &offset, &size))
|
||||
return NULL;
|
||||
return PyBuffer_FromObject(ob, offset, size);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue