Skip to content

Commit

Permalink
Python/modsupport.c
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Feb 23, 2023
1 parent 09b9102 commit 28b8284
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Python/modsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,12 @@ static PyObject *do_mkvalue(const char**, va_list *, int);
static void
do_ignore(const char **p_format, va_list *p_va, char endchar, Py_ssize_t n, int flags)
{
PyObject *v;
Py_ssize_t i;
assert(PyErr_Occurred());
v = PyTuple_New(n);
for (i = 0; i < n; i++) {
PyObject *exception, *value, *tb, *w;

PyErr_Fetch(&exception, &value, &tb);
w = do_mkvalue(p_format, p_va, flags);
PyErr_Restore(exception, value, tb);
PyObject *v = PyTuple_New(n);
for (Py_ssize_t i = 0; i < n; i++) {
PyObject *exc = PyErr_GetRaisedException();
PyObject *w = do_mkvalue(p_format, p_va, flags);
PyErr_SetRaisedException(exc);
if (w != NULL) {
if (v != NULL) {
PyTuple_SET_ITEM(v, i, w);
Expand Down

0 comments on commit 28b8284

Please sign in to comment.