From: Avery Pennarun Date: Fri, 3 Dec 2010 19:08:03 +0000 (-0800) Subject: Use PyLong_FromUnsignedLong instead of Py_BuildValue("I") X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0e2c2944aac4d0242ae15caca1d151d3e38cb7ab;p=packages%2Fb%2Fbup.git Use PyLong_FromUnsignedLong instead of Py_BuildValue("I") ...for python-pre-2.4.3 compatibility. The "I" option was broken before python 2.4.3, even though it was supposed to be supported since python 2.3. Reported by Michael Budde. Signed-off-by: Avery Pennarun --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index 7a144d2..40235ee 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -73,7 +73,7 @@ static PyObject *firstword(PyObject *self, PyObject *args) return NULL; v = ntohl(*(uint32_t *)buf); - return Py_BuildValue("I", v); + return PyLong_FromUnsignedLong(v); } @@ -92,7 +92,7 @@ static PyObject *extract_bits(PyObject *self, PyObject *args) mask = (1<> (32-nbits)) & mask; - return Py_BuildValue("I", v); + return PyLong_FromUnsignedLong(v); }