Message236157
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 ;-) |
|
| Date |
User |
Action |
Args |
| 2015-02-17 23:59:19 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, amaury.forgeotdarc, pitrou, rnk, sargo, serhiy.storchaka |
| 2015-02-17 23:59:19 | vstinner | set | messageid: <[email protected]> |
| 2015-02-17 23:59:19 | vstinner | link | issue6532 messages |
| 2015-02-17 23:59:19 | vstinner | create | |
|