From: Martin v. Löwis Date: Wed, 18 Aug 2010 16:12:23 +0000 (+0000) Subject: Restore GIL in nis_cat in case of error. X-Git-Tag: v3.2a2~230 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfaf9ec93a75a5d41b89dfd4c6540f1289798130;p=python Restore GIL in nis_cat in case of error. --- diff --git a/Misc/NEWS b/Misc/NEWS index 8a1d414c09..59ad9d34a3 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -57,6 +57,8 @@ Core and Builtins Extensions ---------- +- Restore GIL in nis_cat in case of error. + - Issue #665761: ``functools.reduce()`` will no longer mask exceptions other than ``TypeError`` raised by the iterator argument. diff --git a/Modules/nismodule.c b/Modules/nismodule.c index 16c7b813b0..d75af5d589 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -124,6 +124,7 @@ nis_foreach (int instatus, char *inkey, int inkeylen, char *inval, PyErr_Clear(); Py_XDECREF(key); Py_XDECREF(val); + indata->state = PyEval_SaveThread(); return 1; } err = PyDict_SetItem(indata->dict, key, val);