]> granicus.if.org Git - python/commitdiff
Merged revisions 84172 via svnmerge from
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 19 Aug 2010 09:09:04 +0000 (09:09 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 19 Aug 2010 09:09:04 +0000 (09:09 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84172 | martin.v.loewis | 2010-08-18 18:12:23 +0200 (Mi, 18 Aug 2010) | 2 lines

  Restore GIL in nis_cat in case of error.
........

Misc/NEWS
Modules/nismodule.c

index e8b68e0bab93ae037d9b0d140adb4584a0826c11..29bc2767e35807ae00b973455f7d7ff93dd2eeb6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.7.1?
 Core and Builtins
 -----------------
 
+- Restore GIL in nis_cat in case of error.
+
 - Issue #8530: Prevent stringlib fastsearch from reading beyond the front
   of an array.
 
index 04d8570329af4046eeefff8ec0fda987d1fc4bd4..6acab63ddfd7d2d469eff25af11c544cd6d608df 100644 (file)
@@ -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);