[Python-checkins] cpython (merge 3.2 -> 3.3): Merge with 3.2 : Don't DECREF the ctypes error_object without the GIL held.

kristjan.jonsson python-checkins at python.org
Fri Dec 21 12:25:16 CET 2012


http://hg.python.org/cpython/rev/6c31a921a569
changeset:   80969:6c31a921a569
branch:      3.3
parent:      80964:ccafaabe1a7f
parent:      80968:0935394069cc
user:        Kristjan Valur Jonsson <sweskman at gmail.com>
date:        Fri Dec 21 11:22:29 2012 +0000
summary:
  Merge with 3.2 : Don't DECREF the ctypes error_object without the GIL held.

files:
  Modules/_ctypes/callproc.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -817,11 +817,11 @@
         space[0] = errno;
         errno = temp;
     }
-    Py_XDECREF(error_object);
 #ifdef WITH_THREAD
     if ((flags & FUNCFLAG_PYTHONAPI) == 0)
         Py_BLOCK_THREADS
 #endif
+    Py_XDECREF(error_object);
 #ifdef MS_WIN32
 #ifndef DONT_USE_SEH
     if (dwExceptionCode) {

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list