]> 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:03:03 +0000 (09:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 19 Aug 2010 09:03:03 +0000 (09:03 +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 d035ff10bd634c9eb48588725852262d19a4cd29..39e24303604c4a6efaa05cb505ed8db18a18b78c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.1.3?
 Core and Builtins
 -----------------
 
+- Restore GIL in nis_cat in case of error.
+
 - Issue #5319: Print an error if flushing stdout fails at interpreter
   shutdown.
 
index 16c7b813b074ea9ffdc9bacf37f7ad93fd6e1b18..d75af5d589cd82966f2c0baa1eaccd935085237e 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);