diff options
| author | James Henstridge <james@jamesh.id.au> | 2008-07-23 16:57:10 +0800 |
|---|---|---|
| committer | James Henstridge <james@jamesh.id.au> | 2008-07-23 16:57:10 +0800 |
| commit | a2f3e4a3acd58afb09438be186e5fb0a98620820 (patch) | |
| tree | a258f530213afb3718c7a90c98199af8e85f29f3 | |
| parent | 0aec2840d85af2a87644632231a4dff349d15fd6 (diff) | |
| download | psycopg2-a2f3e4a3acd58afb09438be186e5fb0a98620820.tar.gz | |
* psycopg/lobject_type.c (lobject_setup): use
FORMAT_CODE_PY_SSIZE_T in Dprintf() call for 64-bit compatibility
when using Python 2.5 or later.
(lobject_dealloc): same here.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | psycopg/lobject_type.c | 8 |
2 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2008-07-23 James Henstridge <james@jamesh.id.au> + + * psycopg/lobject_type.c (lobject_setup): use + FORMAT_CODE_PY_SSIZE_T in Dprintf() call for 64-bit compatibility + when using Python 2.5 or later. + (lobject_dealloc): same here. + 2008-07-18 James Henstridge <james@jamesh.id.au> * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c index ca0a82b..c4386bf 100644 --- a/psycopg/lobject_type.c +++ b/psycopg/lobject_type.c @@ -282,8 +282,8 @@ lobject_setup(lobjectObject *self, connectionObject *conn, if (lobject_open(self, conn, oid, mode, new_oid, new_file) == -1) return -1; - Dprintf("lobject_setup: good lobject object at %p, refcnt = %d", - self, ((PyObject *)self)->ob_refcnt); + Dprintf("lobject_setup: good lobject object at %p, refcnt = " + FORMAT_CODE_PY_SSIZE_T, self, ((PyObject *)self)->ob_refcnt); Dprintf("lobject_setup: oid = %d, fd = %d", self->oid, self->fd); return 0; } @@ -297,8 +297,8 @@ lobject_dealloc(PyObject* obj) PyErr_Print(); Py_XDECREF((PyObject*)self->conn); - Dprintf("lobject_dealloc: deleted lobject object at %p, refcnt = %d", - obj, obj->ob_refcnt); + Dprintf("lobject_dealloc: deleted lobject object at %p, refcnt = " + FORMAT_CODE_PY_SSIZE_T, obj, obj->ob_refcnt); obj->ob_type->tp_free(obj); } |
