summaryrefslogtreecommitdiffstats
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
commit96a8c3954cbdb186bc567a490dad8987508ce268 (patch)
tree4d6516790abcd566c43418e4c9b02e9c52cf9f2f /Modules/_sre.c
parentfd9a4b19e9c77e9ccc3e7fcb57051cf160c0df6d (diff)
downloadcpython-96a8c3954cbdb186bc567a490dad8987508ce268.zip
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.gz
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.bz2
Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r--Modules/_sre.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 1b0fbc8..4d7b4fc 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2891,7 +2891,7 @@ match_start(MatchObject* self, PyObject* args)
int index;
PyObject* index_ = Py_False; /* zero */
- if (!PyArg_ParseTuple(args, "|O:start", &index_))
+ if (!PyArg_UnpackTuple(args, "start", 0, 1, &index_))
return NULL;
index = match_getindex(self, index_);
@@ -2914,7 +2914,7 @@ match_end(MatchObject* self, PyObject* args)
int index;
PyObject* index_ = Py_False; /* zero */
- if (!PyArg_ParseTuple(args, "|O:end", &index_))
+ if (!PyArg_UnpackTuple(args, "end", 0, 1, &index_))
return NULL;
index = match_getindex(self, index_);
@@ -2964,7 +2964,7 @@ match_span(MatchObject* self, PyObject* args)
int index;
PyObject* index_ = Py_False; /* zero */
- if (!PyArg_ParseTuple(args, "|O:span", &index_))
+ if (!PyArg_UnpackTuple(args, "span", 0, 1, &index_))
return NULL;
index = match_getindex(self, index_);