1
1
mirror of https://github.com/psycopg/psycopg2.git synced 2025-02-25 05:00:32 +03:00

* 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.
This commit is contained in:
James Henstridge 2008-07-23 16:57:10 +08:00
parent 0aec2840d8
commit a2f3e4a3ac
2 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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);
}