diff --git a/psycopg/bytes_format.c b/psycopg/bytes_format.c index 6d12d6c7..206e870d 100644 --- a/psycopg/bytes_format.c +++ b/psycopg/bytes_format.c @@ -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))); diff --git a/psycopg/lobject_int.c b/psycopg/lobject_int.c index d6ebd44e..b78b4a9b 100644 --- a/psycopg/lobject_int.c +++ b/psycopg/lobject_int.c @@ -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;