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:
Thomas Wouters 2006-02-16 19:44:46 +00:00
parent de01774dae
commit 02cbdd3461
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}