Use the proper printf placeholders to avoid warnings on 64 bit builds

This commit is contained in:
Daniele Varrazzo 2011-01-03 19:17:39 +01:00
parent b276e3b05d
commit 39dd577c90
2 changed files with 3 additions and 3 deletions

View File

@ -237,7 +237,7 @@ Bytes_Format(PyObject *format, PyObject *args)
default:
PyErr_Format(PyExc_ValueError,
"unsupported format character '%c' (0x%x) "
"at index %zd",
"at index " FORMAT_CODE_PY_SSIZE_T,
c, c,
(Py_ssize_t)(fmt - 1 -
Bytes_AsString(format)));

View File

@ -203,7 +203,7 @@ lobject_write(lobjectObject *self, const char *buf, size_t len)
PGresult *pgres = NULL;
char *error = NULL;
Dprintf("lobject_writing: fd = %d, len = " FORMAT_CODE_PY_SSIZE_T,
Dprintf("lobject_writing: fd = %d, len = " FORMAT_CODE_SIZE_T,
self->fd, len);
Py_BEGIN_ALLOW_THREADS;
@ -338,7 +338,7 @@ lobject_truncate(lobjectObject *self, size_t len)
PGresult *pgres = NULL;
char *error = NULL;
Dprintf("lobject_truncate: fd = %d, len = " FORMAT_CODE_PY_SSIZE_T,
Dprintf("lobject_truncate: fd = %d, len = " FORMAT_CODE_SIZE_T,
self->fd, len);
Py_BEGIN_ALLOW_THREADS;