mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Support %zd in PyErr_Format and PyString_FromFormat.
This commit is contained in:
parent
26efe402c2
commit
2c95cc6d72
8 changed files with 35 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue