diff options
Diffstat (limited to 'plugins/python/uwsgi_python.h')
-rw-r--r-- | plugins/python/uwsgi_python.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h index ec64ad80..f91f7b43 100644 --- a/plugins/python/uwsgi_python.h +++ b/plugins/python/uwsgi_python.h @@ -16,6 +16,10 @@ #define UWSGI_PYTHON_OLD #endif +#if (PY_VERSION_HEX >= 0x030b0000) +# define UWSGI_PY311 +#endif + #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7 #define HAS_NOT_PyMemoryView_FromBuffer #endif @@ -177,11 +181,19 @@ struct uwsgi_python { char *callable; +#ifdef UWSGI_PY311 + int *current_recursion_remaining; + _PyCFrame **current_frame; + + int current_main_recursion_remaining; + _PyCFrame *current_main_frame; +#else int *current_recursion_depth; struct _frame **current_frame; int current_main_recursion_depth; struct _frame *current_main_frame; +#endif void (*swap_ts)(struct wsgi_request *, struct uwsgi_app *); void (*reset_ts)(struct wsgi_request *, struct uwsgi_app *); |