gh-91353: Fix void return type handling in ctypes (GH-32246) by hoodmane · Pull Request #32246 · python/cpython
_ctypes_get_ffi_type never returns ffi_type_void. If the return type is specified as None, we need set the libffi return type to void, but just taking the output from _ctypes_get_ffi_type will make the return type be sint. This fixes two spots where ctypes accidentally converts None return type to sint rather than void, causing crashes on Emscripten targets.
ambv
changed the title
bpo-47197: Fix void return type handling in ctypes
gh-91353: Fix void return type handling in ctypes
tiran
changed the title
gh-91353: Fix void return type handling in ctypes
gh-91353: Fix void return type handling in ctypes (GH-32246)
hoodmane
mannequin
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters