diff options
Diffstat (limited to 'Modules/_sre.c')
| -rw-r--r-- | Modules/_sre.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 9600a08..38d0127 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1629,7 +1629,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*); static PyObject * sre_codesize(PyObject* self, PyObject *unused) { - return Py_BuildValue("l", sizeof(SRE_CODE)); + return PyLong_FromSize_t(sizeof(SRE_CODE)); } static PyObject * @@ -2467,7 +2467,7 @@ next: return NULL; if (subn) - return Py_BuildValue("Ni", item, n); + return Py_BuildValue("Nn", item, n); return item; @@ -3423,7 +3423,7 @@ match_start(MatchObject* self, PyObject* args) } /* 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* @@ -3446,7 +3446,7 @@ match_end(MatchObject* self, PyObject* args) } /* 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*) @@ -3596,7 +3596,7 @@ static PyObject * 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; } |
