From 02cbdd3461b07bde5f3c304c1c316191c0a73c52 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Thu, 16 Feb 2006 19:44:46 +0000 Subject: 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?) --- Objects/bufferobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c index b0227c1..eff06aa 100644 --- a/Objects/bufferobject.c +++ b/Objects/bufferobject.c @@ -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); } -- cgit v0.12