mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Issue #23571: Restore removed assert(!PyErr_Occurred()); in
PyEval_CallObjectWithKeywords() Sorry Serhiy, I missed your explanation because the review email was moved to my Spam folder :-(
This commit is contained in:
parent
b8a78d3d85
commit
59b356d659
1 changed files with 7 additions and 0 deletions
|
@ -4118,6 +4118,13 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
|
||||||
{
|
{
|
||||||
PyObject *result;
|
PyObject *result;
|
||||||
|
|
||||||
|
#ifdef Py_DEBUG
|
||||||
|
/* PyEval_CallObjectWithKeywords() must not be called with an exception
|
||||||
|
set. It raises a new exception if parameters are invalid or if
|
||||||
|
PyTuple_New() fails, and so the original exception is lost. */
|
||||||
|
assert(!PyErr_Occurred());
|
||||||
|
#endif
|
||||||
|
|
||||||
if (arg == NULL) {
|
if (arg == NULL) {
|
||||||
arg = PyTuple_New(0);
|
arg = PyTuple_New(0);
|
||||||
if (arg == NULL)
|
if (arg == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue