summaryrefslogtreecommitdiffstats
path: root/Objects/bufferobject.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-02-16 19:44:46 (GMT)
committerThomas Wouters <thomas@python.org>2006-02-16 19:44:46 (GMT)
commit02cbdd3461b07bde5f3c304c1c316191c0a73c52 (patch)
tree7b2611a28c121683e3f3d0a134ddd6079533666f /Objects/bufferobject.c
parentde01774dae6771aa5abdaca2ef39e339ad223f8d (diff)
downloadcpython-02cbdd3461b07bde5f3c304c1c316191c0a73c52.zip
cpython-02cbdd3461b07bde5f3c304c1c316191c0a73c52.tar.gz
cpython-02cbdd3461b07bde5f3c304c1c316191c0a73c52.tar.bz2
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?)
Diffstat (limited to 'Objects/bufferobject.c')
-rw-r--r--Objects/bufferobject.c2
1 files changed, 1 insertions, 1 deletions
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);
}