diff options
author | Guido van Rossum <guido@python.org> | 2000-02-29 13:59:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-02-29 13:59:29 (GMT) |
commit | 43713e5a2899930a8698e244b0d0fef59a676d17 (patch) | |
tree | 3d9740aff47f70cea403a2c924a37b468d1eded6 /Modules/timemodule.c | |
parent | a9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b (diff) | |
download | cpython-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/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 1d0fc3c..392f2b9 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -373,7 +373,7 @@ time_strftime(self, args) memset((ANY *) &buf, '\0', sizeof(buf)); - if (!PyArg_ParseTuple(args, "sO", &fmt, &tup) || !gettmarg(tup, &buf)) + if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) || !gettmarg(tup, &buf)) return NULL; fmtlen = strlen(fmt); @@ -421,7 +421,7 @@ time_strptime(self, args) char *buf; char *s; - if (!PyArg_ParseTuple(args, "s|s", &buf, &fmt)) { + if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt)) { PyErr_SetString(PyExc_ValueError, "invalid argument"); return NULL; } @@ -455,7 +455,7 @@ time_asctime(self, args) PyObject *tup; struct tm buf; char *p; - if (!PyArg_ParseTuple(args, "O", &tup)) + if (!PyArg_ParseTuple(args, "O:asctime", &tup)) return NULL; if (!gettmarg(tup, &buf)) return NULL; @@ -506,7 +506,7 @@ time_mktime(self, args) PyObject *tup; struct tm buf; time_t tt; - if (!PyArg_ParseTuple(args, "O", &tup)) + if (!PyArg_ParseTuple(args, "O:mktime", &tup)) return NULL; tt = time(&tt); buf = *localtime(&tt); |