]> granicus.if.org Git - python/commitdiff
Issue #8407: Use an explicit cast for FreeBSD
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 9 May 2011 12:45:38 +0000 (14:45 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 9 May 2011 12:45:38 +0000 (14:45 +0200)
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

Modules/signalmodule.c

index 7e07b3eb0c12fa0985c3325ab5d6e3b962b4da51..e5046691a6e1a897e7e56af84d4a8b1e3e8dc749 100644 (file)
@@ -688,7 +688,7 @@ signal_pthread_kill(PyObject *self, PyObject *args)
     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);