mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
which returned an invalid result (result+error or no result without error) in the exception message. Add also unit test to check that the exception contains the name of the function. Special case: the final _PyEval_EvalFrameEx() check doesn't mention the function since it didn't execute a single function but a whole frame.
This commit is contained in:
parent
6921c13bbb
commit
efde146b0c
6 changed files with 93 additions and 12 deletions
|
|
@ -267,8 +267,9 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
|
|||
PyObject *args, PyObject *kw);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *obj,
|
||||
const char *func_name);
|
||||
PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func,
|
||||
PyObject *result,
|
||||
const char *where);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue