mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
This commit is contained in:
parent
3690688149
commit
81e3aa835c
13 changed files with 107 additions and 73 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "pycore_pyerrors.h"
|
||||
|
||||
|
||||
/******** Unary functions ********/
|
||||
|
||||
static PyObject *
|
||||
no_intrinsic(PyThreadState* tstate, PyObject *unused)
|
||||
|
@ -208,3 +209,20 @@ _PyIntrinsics_UnaryFunctions[] = {
|
|||
[INTRINSIC_UNARY_POSITIVE] = unary_pos,
|
||||
[INTRINSIC_LIST_TO_TUPLE] = list_to_tuple,
|
||||
};
|
||||
|
||||
|
||||
/******** Binary functions ********/
|
||||
|
||||
|
||||
static PyObject *
|
||||
prep_reraise_star(PyThreadState* unused, PyObject *orig, PyObject *excs)
|
||||
{
|
||||
assert(PyList_Check(excs));
|
||||
return _PyExc_PrepReraiseStar(orig, excs);
|
||||
}
|
||||
|
||||
instrinsic_func2
|
||||
_PyIntrinsics_BinaryFunctions[] = {
|
||||
[INTRINSIC_PREP_RERAISE_STAR] = prep_reraise_star,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue