changeset 148:60f751ce41dd

Patch greenlet.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:21:00 +0200
parents aaf8da3affd7
children 8fb0be047961
files uwsginl/files/patch-plugins_greenlet_greenlet.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_greenlet_greenlet.c	Mon Sep 26 23:21:00 2022 +0200
@@ -0,0 +1,16 @@
+--- plugins/greenlet/greenlet.c.orig	2022-09-26 21:13:25 UTC
++++ plugins/greenlet/greenlet.c
+@@ -35,11 +35,11 @@ end:
+ }
+ 
+ static void gil_greenlet_get() {
+-        pthread_setspecific(up.upt_gil_key, (void *) PyGILState_Ensure());
++    pthread_setspecific(up.upt_gil_key, (void *) (uintptr_t) PyGILState_Ensure());
+ }
+ 
+ static void gil_greenlet_release() {
+-        PyGILState_Release((PyGILState_STATE) pthread_getspecific(up.upt_gil_key));
++    PyGILState_Release((PyGILState_STATE) (uintptr_t) pthread_getspecific(up.upt_gil_key));
+ }
+ 
+ static PyObject *py_uwsgi_greenlet_request(PyObject * self, PyObject *args) {