[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX
Erik Bray
report at bugs.python.org
Tue Aug 23 09:30:07 EDT 2016
Erik Bray added the comment:
I agree--this has the same problem on Cygwin, where pthread_key_t is not just a typedef'd integer (in fact it's a pointer to an instance of a class).
Anyways as Ed wrote above POSIX says this is supposed to be an opaque type and there's no reason to assume it's an integer. Linux could change its definition tomorrow and we'd have no one to blame but ourselves if it breaks Python.
If it's too hard to change the Python API, at the very least the change in #22206 should be reverted or reworked somehow, because there's no reason to assume that pthread_key_t can even be compared safely to an integer, much less that it would be less than INT_MAX.
----------
nosy: +erik.bray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25658>
_______________________________________
More information about the Python-bugs-list
mailing list