diff -r bfe042a363e6 Modules/_sre.c --- a/Modules/_sre.c Sat Oct 20 20:13:42 2012 +1000 +++ b/Modules/_sre.c Sun Oct 21 00:49:25 2012 +0300 @@ -1618,7 +1618,7 @@ static PyObject * sre_codesize(PyObject* self, PyObject *unused) { - return Py_BuildValue("l", sizeof(SRE_CODE)); + return PyLong_FromSize_t(sizeof(SRE_CODE)); } static PyObject * @@ -2435,7 +2435,7 @@ return NULL; if (subn) - return Py_BuildValue("Ni", item, n); + return Py_BuildValue("Nn", item, n); return item; @@ -3387,7 +3387,7 @@ } /* mark is -1 if group is undefined */ - return Py_BuildValue("i", self->mark[index*2]); + return PyLong_FromSsize_t(self->mark[index*2]); } static PyObject* @@ -3410,7 +3410,7 @@ } /* mark is -1 if group is undefined */ - return Py_BuildValue("i", self->mark[index*2+1]); + return PyLong_FromSsize_t(self->mark[index*2+1]); } LOCAL(PyObject*) @@ -3560,7 +3560,7 @@ match_lastindex_get(MatchObject *self) { if (self->lastindex >= 0) - return Py_BuildValue("i", self->lastindex); + return PyLong_FromSsize_t(self->lastindex); Py_INCREF(Py_None); return Py_None; }