[Python-checkins] cpython: Issue #8407: Use an explicit cast for FreeBSD
victor.stinner
python-checkins at python.org
Mon May 9 14:46:25 CEST 2011
http://hg.python.org/cpython/rev/2e0d3092249b
changeset: 69978:2e0d3092249b
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon May 09 14:45:38 2011 +0200
summary:
Issue #8407: Use an explicit cast for FreeBSD
pthread_t is a pointer, not an integer, on FreeBSD. It should fix the following
gcc warning:
passing argument 1 of ‘pthread_kill’ makes pointer from integer without a cast
files:
Modules/signalmodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -688,7 +688,7 @@
if (!PyArg_ParseTuple(args, "li:pthread_kill", &tid, &signum))
return NULL;
- err = pthread_kill(tid, signum);
+ err = pthread_kill((pthread_t)tid, signum);
if (err != 0) {
errno = err;
PyErr_SetFromErrno(PyExc_OSError);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list