diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 18:43:18 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 18:43:18 (GMT) |
commit | 2250c4cb81c4f07164a83b91bf0070247ca4c4b0 (patch) | |
tree | 3f64b764dea521d73cbdb6d89a58dca8ffb612ce /Objects | |
parent | ff79396c8371be548e7310cceb54f57f7fd1384e (diff) | |
download | cpython-2250c4cb81c4f07164a83b91bf0070247ca4c4b0.zip cpython-2250c4cb81c4f07164a83b91bf0070247ca4c4b0.tar.gz cpython-2250c4cb81c4f07164a83b91bf0070247ca4c4b0.tar.bz2 |
Issue #27830: Remove unused _PyStack_AsDict()
I forgot to remove this function, I made a mistake in my revert.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index cf69b96..654fc02 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2309,40 +2309,6 @@ exit: return result; } -static PyObject * -_PyStack_AsDict(PyObject **stack, Py_ssize_t nkwargs, PyObject *func) -{ - PyObject *kwdict; - - kwdict = PyDict_New(); - if (kwdict == NULL) { - return NULL; - } - - while (--nkwargs >= 0) { - int err; - PyObject *key = *stack++; - PyObject *value = *stack++; - if (PyDict_GetItem(kwdict, key) != NULL) { - PyErr_Format(PyExc_TypeError, - "%.200s%s got multiple values " - "for keyword argument '%U'", - PyEval_GetFuncName(func), - PyEval_GetFuncDesc(func), - key); - Py_DECREF(kwdict); - return NULL; - } - - err = PyDict_SetItem(kwdict, key, value); - if (err) { - Py_DECREF(kwdict); - return NULL; - } - } - return kwdict; -} - /* Positional arguments are obj followed args. */ PyObject * _PyObject_Call_Prepend(PyObject *func, |