diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-10-27 07:00:56 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-10-27 07:00:56 (GMT) |
commit | b639d49798ed25d6a79175696a0786da442a6fcc (patch) | |
tree | bc3ead289dab9fe63b062e46768054f71c8f22bd /Python/getargs.c | |
parent | dc5eff9170fffae08454d56e5a71f9b6067fd79c (diff) | |
download | cpython-b639d49798ed25d6a79175696a0786da442a6fcc.zip cpython-b639d49798ed25d6a79175696a0786da442a6fcc.tar.gz cpython-b639d49798ed25d6a79175696a0786da442a6fcc.tar.bz2 |
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.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 658d285..c65c149 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1032,7 +1032,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, 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 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, min = max; } - nkwlist = max; nargs = PyTuple_GET_SIZE(args); nkeywords = keywords == NULL ? 0 : PyDict_Size(keywords); @@ -1170,7 +1169,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, /* 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 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format, 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; |