Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c51bafb

Browse files
committed
Merge with 3.2 : Don't DECREF the ctypes error_object without the GIL held.
2 parents 9cb7bd2 + 3cbdaa3 commit c51bafb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,11 +817,11 @@ static int _call_function_pointer(int flags,
817817
space[0] = errno;
818818
errno = temp;
819819
}
820-
Py_XDECREF(error_object);
821820
#ifdef WITH_THREAD
822821
if ((flags & FUNCFLAG_PYTHONAPI) == 0)
823822
Py_BLOCK_THREADS
824823
#endif
824+
Py_XDECREF(error_object);
825825
#ifdef MS_WIN32
826826
#ifndef DONT_USE_SEH
827827
if (dwExceptionCode) {

0 commit comments

Comments
 (0)