Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfaf9ec

Browse files
committed
Restore GIL in nis_cat in case of error.
1 parent c14190d commit dfaf9ec

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Core and Builtins
5757
Extensions
5858
----------
5959

60+
- Restore GIL in nis_cat in case of error.
61+
6062
- Issue #665761: ``functools.reduce()`` will no longer mask exceptions
6163
other than ``TypeError`` raised by the iterator argument.
6264

Modules/nismodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ nis_foreach (int instatus, char *inkey, int inkeylen, char *inval,
124124
PyErr_Clear();
125125
Py_XDECREF(key);
126126
Py_XDECREF(val);
127+
indata->state = PyEval_SaveThread();
127128
return 1;
128129
}
129130
err = PyDict_SetItem(indata->dict, key, val);

0 commit comments

Comments
 (0)