[issue1798] Add ctypes calling convention that allows safe access of errno
Armin Rigo
report at bugs.python.org
Fri Jun 6 13:07:06 CEST 2008
Armin Rigo <arigo at users.sourceforge.net> added the comment:
> (Another note: the C-level errno and the TLS copy should also be
> synchronized when the C code invokes a Python callback.)
What I meant is what should occur when a pure Python function is used
as a callback. At this point there is already some logic e.g. to
re-acquire the GIL if necessary. Maybe it needs to grow logic to
optionally copy the C-level errno into the TLS variable at the start,
and at the end copy it back into the C-level errno at the end, for the
cases where the C code expects the callback to be able to set errno.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1798>
_______________________________________
More information about the Python-bugs-list
mailing list