Commit 02cbdd34 authored by Thomas Wouters's avatar Thomas Wouters

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?)
parent de01774d
...@@ -196,7 +196,7 @@ buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw) ...@@ -196,7 +196,7 @@ buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
if (!_PyArg_NoKeywords("buffer()", kw)) if (!_PyArg_NoKeywords("buffer()", kw))
return NULL; 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 NULL;
return PyBuffer_FromObject(ob, offset, size); return PyBuffer_FromObject(ob, offset, size);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment