summaryrefslogtreecommitdiffstats
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 17:34:35 (GMT)
committerGitHub <noreply@github.com>2018-11-27 17:34:35 (GMT)
commitd4f9cf5545d6d8844e0726552ef2e366f5cc3abd (patch)
tree7aefae9861ee6b83652f6a352397b9dc145cc0d3 /Modules/_sre.c
parent1005c84535191a72ebb7587d8c5636a065b7ed79 (diff)
downloadcpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.zip
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.gz
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.bz2
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r--Modules/_sre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index c350979..75f030c 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1305,7 +1305,7 @@ PyDoc_STRVAR(pattern_doc, "Compiled regular expression object.");
/* PatternObject's 'groupindex' method. */
static PyObject *
-pattern_groupindex(PatternObject *self)
+pattern_groupindex(PatternObject *self, void *Py_UNUSED(ignored))
{
if (self->groupindex == NULL)
return PyDict_New();
@@ -2272,7 +2272,7 @@ PyDoc_STRVAR(match_group_doc,
For 0 returns the entire match.");
static PyObject *
-match_lastindex_get(MatchObject *self)
+match_lastindex_get(MatchObject *self, void *Py_UNUSED(ignored))
{
if (self->lastindex >= 0)
return PyLong_FromSsize_t(self->lastindex);
@@ -2280,7 +2280,7 @@ match_lastindex_get(MatchObject *self)
}
static PyObject *
-match_lastgroup_get(MatchObject *self)
+match_lastgroup_get(MatchObject *self, void *Py_UNUSED(ignored))
{
if (self->pattern->indexgroup &&
self->lastindex >= 0 &&
@@ -2295,7 +2295,7 @@ match_lastgroup_get(MatchObject *self)
}
static PyObject *
-match_regs_get(MatchObject *self)
+match_regs_get(MatchObject *self, void *Py_UNUSED(ignored))
{
if (self->regs) {
Py_INCREF(self->regs);