summaryrefslogtreecommitdiffstats
path: root/Python/intrinsics.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-02-14 11:54:13 (GMT)
committerGitHub <noreply@github.com>2023-02-14 11:54:13 (GMT)
commit81e3aa835c32363f4547b6566edf1125386f1f6d (patch)
tree4a20320722549dca1c5d581772aa2a6152d8ca5b /Python/intrinsics.c
parent3690688149dca11589af59b7704541336613199a (diff)
downloadcpython-81e3aa835c32363f4547b6566edf1125386f1f6d.zip
cpython-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.gz
cpython-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.bz2
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
Diffstat (limited to 'Python/intrinsics.c')
-rw-r--r--Python/intrinsics.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/Python/intrinsics.c b/Python/intrinsics.c
index ae17758..9e90ef3 100644
--- a/Python/intrinsics.c
+++ b/Python/intrinsics.c
@@ -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,
+};
+