diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-01-03 19:17:39 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-01-03 20:44:57 +0100 |
commit | 39dd577c90a1f79c06d0613e73c2addbd53a4468 (patch) | |
tree | dfd886b6392b9f733327156921c40fae4c80b97b | |
parent | b276e3b05dee01396d7703cced6e3b75e05caec3 (diff) | |
download | psycopg2-39dd577c90a1f79c06d0613e73c2addbd53a4468.tar.gz |
Use the proper printf placeholders to avoid warnings on 64 bit builds
-rw-r--r-- | psycopg/bytes_format.c | 2 | ||||
-rw-r--r-- | psycopg/lobject_int.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/psycopg/bytes_format.c b/psycopg/bytes_format.c index 6d12d6c..206e870 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 d6ebd44..b78b4a9 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; |