[Python-checkins] r42426 - python/trunk/Objects/bufferobject.c

thomas.wouters python-checkins at python.org
Thu Feb 16 20:44:49 CET 2006


Author: thomas.wouters
Date: Thu Feb 16 20:44:46 2006
New Revision: 42426

Modified:
   python/trunk/Objects/bufferobject.c
Log:

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?)



Modified: python/trunk/Objects/bufferobject.c
==============================================================================
--- python/trunk/Objects/bufferobject.c	(original)
+++ python/trunk/Objects/bufferobject.c	Thu Feb 16 20:44:46 2006
@@ -196,7 +196,7 @@
 	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);
 }


More information about the Python-checkins mailing list