diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-04-30 14:55:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 14:55:15 (GMT) |
commit | 9a75d56d5d9fdffb6ce9d83ede98486df238102d (patch) | |
tree | 119a65ca0729b89d0dded348682f42ab5b767c65 /Python/errors.c | |
parent | 17a8af9508d6001e1666de984e2fb73f02167306 (diff) | |
download | cpython-9a75d56d5d9fdffb6ce9d83ede98486df238102d.zip cpython-9a75d56d5d9fdffb6ce9d83ede98486df238102d.tar.gz cpython-9a75d56d5d9fdffb6ce9d83ede98486df238102d.tar.bz2 |
gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-118381)
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index e5f176a..433253b 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -632,8 +632,8 @@ _PyErr_StackItemToExcInfoTuple(_PyErr_StackItem *err_info) PyObject *exc_type = get_exc_type(exc_value); PyObject *exc_traceback = get_exc_traceback(exc_value); - return Py_BuildValue( - "(OOO)", + return PyTuple_Pack( + 3, exc_type ? exc_type : Py_None, exc_value ? exc_value : Py_None, exc_traceback ? exc_traceback : Py_None); |