mirror of
https://github.com/python/cpython
synced 2026-09-29 08:05:30 +03:00
_PyObject_FastCallKeywords() now checks !PyErr_Occurred()
Issue #29259. All other functions calling functions start with the similar assertion.
This commit is contained in:
parent
c89ef828cf
commit
98ccba8344
1 changed files with 5 additions and 0 deletions
|
|
@ -2482,6 +2482,11 @@ PyObject *
|
|||
_PyObject_FastCallKeywords(PyObject *callable, PyObject **stack, Py_ssize_t nargs,
|
||||
PyObject *kwnames)
|
||||
{
|
||||
/* _PyObject_FastCallKeywords() must not be called with an exception set,
|
||||
because it can clear it (directly or indirectly) and so the
|
||||
caller loses its exception */
|
||||
assert(!PyErr_Occurred());
|
||||
|
||||
assert(nargs >= 0);
|
||||
assert(kwnames == NULL || PyTuple_CheckExact(kwnames));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue