summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-01-10 16:37:47 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-01-10 16:37:47 (GMT)
commit9dccb017033cfba7ffdc6414ea1782a653250685 (patch)
tree9c27902275d39a7e9c9c405d3752de643100236f
parentd618684d654bb5fc962624707721fc4793ed3801 (diff)
downloadcpython-9dccb017033cfba7ffdc6414ea1782a653250685.zip
cpython-9dccb017033cfba7ffdc6414ea1782a653250685.tar.gz
cpython-9dccb017033cfba7ffdc6414ea1782a653250685.tar.bz2
use PyInt_FromSsize_t instead of PyLong_FromSsize_t (#10182)
-rw-r--r--Modules/_sre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 8f47688..b115e2b 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1636,7 +1636,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*);
static PyObject *
sre_codesize(PyObject* self, PyObject *unused)
{
- return PyLong_FromSize_t(sizeof(SRE_CODE));
+ return PyInt_FromSize_t(sizeof(SRE_CODE));
}
static PyObject *
@@ -3389,7 +3389,7 @@ match_start(MatchObject* self, PyObject* args)
}
/* 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*
@@ -3412,7 +3412,7 @@ match_end(MatchObject* self, PyObject* args)
}
/* 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*)
@@ -3602,7 +3602,7 @@ static PyObject *
match_lastindex_get(MatchObject *self)
{
if (self->lastindex >= 0)
- return PyLong_FromSsize_t(self->lastindex);
+ return PyInt_FromSsize_t(self->lastindex);
Py_INCREF(Py_None);
return Py_None;
}