diff --git a/ChangeLog b/ChangeLog index 0344a6de..dd6705f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-23 James Henstridge + + * 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 * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c index ca0a82ba..c4386bf6 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); }