Commit 9dccb017 authored by Benjamin Peterson's avatar Benjamin Peterson

use PyInt_FromSsize_t instead of PyLong_FromSsize_t (#10182)

parent d618684d
...@@ -1636,7 +1636,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*); ...@@ -1636,7 +1636,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*);
static PyObject * static PyObject *
sre_codesize(PyObject* self, PyObject *unused) sre_codesize(PyObject* self, PyObject *unused)
{ {
return PyLong_FromSize_t(sizeof(SRE_CODE)); return PyInt_FromSize_t(sizeof(SRE_CODE));
} }
static PyObject * static PyObject *
...@@ -3389,7 +3389,7 @@ match_start(MatchObject* self, PyObject* args) ...@@ -3389,7 +3389,7 @@ match_start(MatchObject* self, PyObject* args)
} }
/* mark is -1 if group is undefined */ /* mark is -1 if group is undefined */
return PyLong_FromSsize_t(self->mark[index*2]); return PyInt_FromSsize_t(self->mark[index*2]);
} }
static PyObject* static PyObject*
...@@ -3412,7 +3412,7 @@ match_end(MatchObject* self, PyObject* args) ...@@ -3412,7 +3412,7 @@ match_end(MatchObject* self, PyObject* args)
} }
/* mark is -1 if group is undefined */ /* mark is -1 if group is undefined */
return PyLong_FromSsize_t(self->mark[index*2+1]); return PyInt_FromSsize_t(self->mark[index*2+1]);
} }
LOCAL(PyObject*) LOCAL(PyObject*)
...@@ -3602,7 +3602,7 @@ static PyObject * ...@@ -3602,7 +3602,7 @@ static PyObject *
match_lastindex_get(MatchObject *self) match_lastindex_get(MatchObject *self)
{ {
if (self->lastindex >= 0) if (self->lastindex >= 0)
return PyLong_FromSsize_t(self->lastindex); return PyInt_FromSsize_t(self->lastindex);
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment