summaryrefslogtreecommitdiffstats
path: root/Modules/regexmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
commit43713e5a2899930a8698e244b0d0fef59a676d17 (patch)
tree3d9740aff47f70cea403a2c924a37b468d1eded6 /Modules/regexmodule.c
parenta9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b (diff)
downloadcpython-43713e5a2899930a8698e244b0d0fef59a676d17.zip
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.gz
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.bz2
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
Diffstat (limited to 'Modules/regexmodule.c')
-rw-r--r--Modules/regexmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 1f64f61..4fbf5c8 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -119,7 +119,7 @@ regobj_match(re, args)
int offset = 0;
int result;
- if (!PyArg_ParseTuple(args, "O|i", &argstring, &offset))
+ if (!PyArg_ParseTuple(args, "O|i:match", &argstring, &offset))
return NULL;
if (!PyArg_Parse(argstring, "t#", &buffer, &size))
return NULL;
@@ -158,9 +158,9 @@ regobj_search(re, args)
int range;
int result;
- if (!PyArg_ParseTuple(args, "O|i", &argstring, &offset))
+ if (!PyArg_ParseTuple(args, "O|i:search", &argstring, &offset))
return NULL;
- if (!PyArg_Parse(argstring, "t#", &buffer, &size))
+ if (!PyArg_Parse(argstring, "t#:search", &buffer, &size))
return NULL;
if (offset < 0 || offset > size) {
@@ -459,7 +459,7 @@ regex_compile(self, args)
PyObject *pat = NULL;
PyObject *tran = NULL;
- if (!PyArg_ParseTuple(args, "S|S", &pat, &tran))
+ if (!PyArg_ParseTuple(args, "S|S:compile", &pat, &tran))
return NULL;
return newregexobject(pat, tran, pat, NULL);
}
@@ -584,7 +584,7 @@ regex_symcomp(self, args)
PyObject *npattern;
PyObject *retval = NULL;
- if (!PyArg_ParseTuple(args, "S|S", &pattern, &tran))
+ if (!PyArg_ParseTuple(args, "S|S:symcomp", &pattern, &tran))
return NULL;
gdict = PyDict_New();