diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-23 15:48:39 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-03-23 14:48:39 +0100 |
commit | aefa7ebf0ff0f73feee7ab24f4cdcb2014d83ee5 (patch) | |
tree | 39560da26771d1e10add697e558bb727639fdbb0 /Modules/clinic | |
parent | 1e2147b9d75a64df370a9393c2b5b9d170dc0afd (diff) | |
download | cpython-git-aefa7ebf0ff0f73feee7ab24f4cdcb2014d83ee5.tar.gz |
bpo-6532: Make the thread id an unsigned integer. (#781)
* bpo-6532: Make the thread id an unsigned integer.
From C API side the type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), the id parameter of
PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
changed from "long" to "unsigned long".
* Restore a check in thread_get_ident().
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/signalmodule.c.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 9e16f32291..2a4e935e43 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -395,16 +395,17 @@ PyDoc_STRVAR(signal_pthread_kill__doc__, {"pthread_kill", (PyCFunction)signal_pthread_kill, METH_FASTCALL, signal_pthread_kill__doc__}, static PyObject * -signal_pthread_kill_impl(PyObject *module, long thread_id, int signalnum); +signal_pthread_kill_impl(PyObject *module, unsigned long thread_id, + int signalnum); static PyObject * signal_pthread_kill(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - long thread_id; + unsigned long thread_id; int signalnum; - if (!_PyArg_ParseStack(args, nargs, "li:pthread_kill", + if (!_PyArg_ParseStack(args, nargs, "ki:pthread_kill", &thread_id, &signalnum)) { goto exit; } @@ -463,4 +464,4 @@ exit: #ifndef SIGNAL_PTHREAD_KILL_METHODDEF #define SIGNAL_PTHREAD_KILL_METHODDEF #endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */ -/*[clinic end generated code: output=fab3dba32c058588 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c1a3f374b2c77e5d input=a9049054013a1b77]*/ |