diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-12 15:33:26 -0400 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-12 15:33:26 -0400 |
commit | f82037329c779713994ac5de1c56d3aa25467c18 (patch) | |
tree | 314ad135ce2414d2b0364c9b31e8a14e319fd6f2 /Objects/methodobject.c | |
parent | 3f9f6847d5ba68353cdc0df6d0c854e79d13ad95 (diff) | |
download | cpython-f82037329c779713994ac5de1c56d3aa25467c18.tar.gz |
Fix warning in _PyCFunction_FastCallKeywords()
Issue #28105.
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 19e8114d4a..c2001f0169 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -273,7 +273,7 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack, Py_ssize_t nargs, PyObject *kwnames) { PyObject *kwdict, *result; - Py_ssize_t nkwargs; + Py_ssize_t nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames); assert(PyCFunction_Check(func)); assert(nargs >= 0); @@ -282,7 +282,6 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack, /* kwnames must only contains str strings, no subclass, and all keys must be unique */ - nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames); if (nkwargs > 0) { kwdict = _PyStack_AsDict(stack + nargs, kwnames); if (kwdict == NULL) { |