mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583
)
This commit is contained in:
parent
7899fac3c5
commit
b45df737d4
7 changed files with 196 additions and 1 deletions
|
@ -288,6 +288,22 @@ _testcapi_traceback_print_impl(PyObject *module, PyObject *traceback,
|
|||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
_testcapi.unstable_exc_prep_reraise_star
|
||||
orig: object
|
||||
excs: object
|
||||
/
|
||||
To test PyUnstable_Exc_PrepReraiseStar.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_testcapi_unstable_exc_prep_reraise_star_impl(PyObject *module,
|
||||
PyObject *orig, PyObject *excs)
|
||||
/*[clinic end generated code: output=850cf008e0563c77 input=27fbcda2203eb301]*/
|
||||
{
|
||||
return PyUnstable_Exc_PrepReraiseStar(orig, excs);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Define the PyRecurdingInfinitelyError_Type
|
||||
|
@ -328,6 +344,7 @@ static PyMethodDef test_methods[] = {
|
|||
_TESTCAPI_SET_EXCEPTION_METHODDEF
|
||||
_TESTCAPI_TRACEBACK_PRINT_METHODDEF
|
||||
_TESTCAPI_WRITE_UNRAISABLE_EXC_METHODDEF
|
||||
_TESTCAPI_UNSTABLE_EXC_PREP_RERAISE_STAR_METHODDEF
|
||||
{NULL},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue