Support %zd in PyErr_Format and PyString_FromFormat.

This commit is contained in:
Martin v. Löwis 2006-02-16 06:54:25 +00:00
parent 26efe402c2
commit 2c95cc6d72
8 changed files with 35 additions and 19 deletions

View file

@ -243,14 +243,14 @@ buffer_repr(PyBufferObject *self)
const char *status = self->b_readonly ? "read-only" : "read-write";
if ( self->b_base == NULL )
return PyString_FromFormat("<%s buffer ptr %p, size %ld at %p>",
return PyString_FromFormat("<%s buffer ptr %p, size %zd at %p>",
status,
self->b_ptr,
(long)self->b_size,
self);
else
return PyString_FromFormat(
"<%s buffer for %p, size %ld, offset %ld at %p>",
"<%s buffer for %p, size %zd, offset %zd at %p>",
status,
self->b_base,
(long)self->b_size,