mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #28086: Single var-positional argument of tuple subtype was passed
unscathed to the C-defined function. Now it is converted to exact tuple.
This commit is contained in:
parent
5ed548715a
commit
63dc548109
3 changed files with 6 additions and 3 deletions
|
@ -3310,7 +3310,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
}
|
||||
callargs = POP();
|
||||
func = TOP();
|
||||
if (!PyTuple_Check(callargs)) {
|
||||
if (!PyTuple_CheckExact(callargs)) {
|
||||
if (Py_TYPE(callargs)->tp_iter == NULL &&
|
||||
!PySequence_Check(callargs)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
|
@ -3327,7 +3327,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
assert(PyTuple_Check(callargs));
|
||||
assert(PyTuple_CheckExact(callargs));
|
||||
|
||||
result = do_call_core(func, callargs, kwargs);
|
||||
Py_DECREF(func);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue