8000 Don't DECREF the ctypes error_object without the GIL held. · python/cpython@9946bd6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9946bd6

Browse files
committed
Don't DECREF the ctypes error_object without the GIL held.
1 parent 0ee20eb commit 9946bd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,11 +834,11 @@ static int _call_function_pointer(int flags,
834834
space[0] = errno;
835835
errno = temp;
836836
}
837-
Py_XDECREF(error_object);
838837
#ifdef WITH_THREAD
839838
if ((flags & FUNCFLAG_PYTHONAPI) == 0)
840839
Py_BLOCK_THREADS
841840
#endif
841+
Py_XDECREF(error_object);
842842
#ifdef MS_WIN32
843843
#ifndef DONT_USE_SEH
844844
if (dwExceptionCode) {

0 commit comments

Comments
 (0)
0