]> granicus.if.org Git - python/commit
Issue #18609, #18408: _ctypes_add_traceback() now clears the current exception
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 1 Aug 2013 22:47:47 +0000 (00:47 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 1 Aug 2013 22:47:47 +0000 (00:47 +0200)
commit044c516854fa93de4417518bd406498844a2c450
tree7fb36a370179aa3802252c64f07802fc3d6d9113
parent362532bc48f868b24162e32987dad307b2090060
Issue #18609, #18408: _ctypes_add_traceback() now clears the current exception
while adding the traceback, because it may call indirectly a Python function
and Python functions must not be called with an exception set.

In the case of the issue #18609, _ctypes_add_traceback() called the iso8859-1
decoder which is implemented in Python. Python has a ISO-8859-1 codec
implemented in C. It is not used because PyUnicode_Decode() only uses the C
codec for other names (aliases) of this codec ("latin-1", "latin1" and
"iso-8859-1").
Modules/_ctypes/callbacks.c