From e707c3f657108bb9a538e509853de6a77de45f69 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 15 Jun 2015 10:31:14 +0100 Subject: [PATCH] Fixed build on Python 2.5 --- psycopg/lobject_type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c index 973ebe76..dacdbf0a 100644 --- a/psycopg/lobject_type.c +++ b/psycopg/lobject_type.c @@ -197,7 +197,7 @@ psyco_lobj_seek(lobjectObject *self, PyObject *args) if ((pos = lobject_seek(self, offset, whence)) < 0) return NULL; - return PyLong_FromSsize_t(pos); + return PyInt_FromSsize_t(pos); } /* tell method - tell current position in the lobject */ @@ -217,7 +217,7 @@ psyco_lobj_tell(lobjectObject *self, PyObject *args) if ((pos = lobject_tell(self)) < 0) return NULL; - return PyLong_FromSsize_t(pos); + return PyInt_FromSsize_t(pos); } /* unlink method - unlink (destroy) the lobject */