(original) (raw)
changeset: 103714:e67e685a1301 user: Victor Stinner victor.stinner@gmail.com date: Mon Sep 12 15:33:26 2016 -0400 files: Objects/methodobject.c description: Fix warning in _PyCFunction_FastCallKeywords() Issue #28105. diff -r da485c6c744e -r e67e685a1301 Objects/methodobject.c --- a/Objects/methodobject.c Mon Sep 12 19:27:46 2016 +0200 +++ b/Objects/methodobject.c Mon Sep 12 15:33:26 2016 -0400 @@ -273,7 +273,7 @@ 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 @@ /* 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) { /victor.stinner@gmail.com