New submission from Kevin Watters <[EMAIL PROTECTED]>:

in Lib/ctypes/__init__.py the wstring_at and string_at functions are
declared with CFUNCTYPE.

This means that in Modules/_ctypes/callproc.c when the functions are
invoked, Py_UNBLOCK_THREADS and Py_BLOCK_THREADS surround the call. But
string_at and wstring_at call PyString_FromString and
PyUnicode_FromWideChar, respectively.

The solution (I think) is to declare the functions with PYFUNCTYPE
instead, so that callproc.c doesn't release the GIL when calling them.

----------
assignee: theller
components: ctypes
messages: 71135
nosy: kevinwatters, theller
severity: normal
status: open
title: ctypes.wstring_at and string_at call Python API without the GIL
type: crash
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3554>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to