changeset 149:8fb0be047961

Patch tornado.c to compile with clang 13.0. To cast an enum to void* and vice versa use an intermediate cast to uintptr_t.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 26 Sep 2022 23:26:30 +0200
parents 60f751ce41dd
children 3cbf7dca26e8
files uwsginl/files/patch-plugins_tornado_tornado.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uwsginl/files/patch-plugins_tornado_tornado.c	Mon Sep 26 23:26:30 2022 +0200
@@ -0,0 +1,16 @@
+--- plugins/tornado/tornado.c.orig	2022-09-26 21:23:21 UTC
++++ plugins/tornado/tornado.c
+@@ -35,11 +35,11 @@ static struct uwsgi_option tornado_options[] = {
+ };
+ 
+ static void gil_tornado_get() {
+-	pthread_setspecific(up.upt_gil_key, (void *) PyGILState_Ensure());
++	pthread_setspecific(up.upt_gil_key, (void *) (uintptr_t) PyGILState_Ensure());
+ }
+ 
+ static void gil_tornado_release() {
+-	PyGILState_Release((PyGILState_STATE) pthread_getspecific(up.upt_gil_key));
++	PyGILState_Release((PyGILState_STATE) (uintptr_t) pthread_getspecific(up.upt_gil_key));
+ }
+ 
+ static int uwsgi_tornado_wait_read_hook(int fd, int timeout) {