STINNER Victor added the comment:
On Linux, the following C program tells me that pthread_t is unsigned.
---
#include <pthread.h>
#include <stdio.h>
#define TYPE_IS_SIGNED(TYPE) ((TYPE)-1 < (TYPE)0)
int main()
{
printf("signed? %i\n", TYPE_IS_SIGNED(pthread_t));
return 0;
}
---
So it's fair to modify threading.get_ident() to return an unsigned number.
But I disagree to change stable Python versions, it may break applications.
Oh, I wrote write_thread_id() in Python/traceback.c and this function already
casts the thread identifier to an unsigned number ;-)
----------
nosy: +haypo
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6532>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com