Mercurial > cpython-lru_cache-weakref
diff Python/getargs.c @ 20722:676f106a5002 legacy-trunk
vgetargskeywords: Now that it's clear that nkwlist must equal max, and
we're ensuring that's true during the format parse, get rid of nkwlist.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sat, 27 Oct 2001 07:00:56 +0000 |
| parents | acb854b897bb |
| children | 6ac45244c41e |
line wrap: on
line diff
--- a/Python/getargs.c Sat Oct 27 06:53:00 2001 +0000 +++ b/Python/getargs.c Sat Oct 27 07:00:56 2001 +0000 @@ -1032,7 +1032,7 @@ char *fname, *message; int min, max; char *formatsave; - int i, len, nargs, nkeywords, nkwlist; + int i, len, nargs, nkeywords; char *msg, *ks, **p; int pos, match, converted; PyObject *key, *value; @@ -1093,7 +1093,6 @@ min = max; } - nkwlist = max; nargs = PyTuple_GET_SIZE(args); nkeywords = keywords == NULL ? 0 : PyDict_Size(keywords); @@ -1170,7 +1169,7 @@ /* convert the keyword arguments; this uses the format string where it was left after processing args */ converted = 0; - for (i = nargs; i < nkwlist; i++) { + for (i = nargs; i < max; i++) { PyObject *item; if (*format == '|') format++; @@ -1202,7 +1201,7 @@ while (PyDict_Next(keywords, &pos, &key, &value)) { match = 0; ks = PyString_AsString(key); - for (i = 0; i < nkwlist; i++) { + for (i = 0; i < max; i++) { if (!strcmp(ks, kwlist[i])) { match = 1; break;
