mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-118381)
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user