[Python-checkins] r84172 - in python/branches/py3k: Misc/NEWS Modules/nismodule.c

martin.v.loewis python-checkins at python.org
Wed Aug 18 18:12:24 CEST 2010


Author: martin.v.loewis
Date: Wed Aug 18 18:12:23 2010
New Revision: 84172

Log:
Restore GIL in nis_cat in case of error.


Modified:
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Modules/nismodule.c

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Wed Aug 18 18:12:23 2010
@@ -57,6 +57,8 @@
 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.
 

Modified: python/branches/py3k/Modules/nismodule.c
==============================================================================
--- python/branches/py3k/Modules/nismodule.c	(original)
+++ python/branches/py3k/Modules/nismodule.c	Wed Aug 18 18:12:23 2010
@@ -124,6 +124,7 @@
             PyErr_Clear();
             Py_XDECREF(key);
             Py_XDECREF(val);
+            indata->state = PyEval_SaveThread();
             return 1;
         }
         err = PyDict_SetItem(indata->dict, key, val);


More information about the Python-checkins mailing list