From 175454b78c00db0b21bfb305bc5e054a0a2f7224 Mon Sep 17 00:00:00 2001 From: Ladislav Michl Date: Wed, 10 Sep 2025 08:14:40 +0200 Subject: [PATCH] Py3.13: Initialize field tp_versions_used --- src/App/FeaturePythonPyImp.h | 4 +++- src/App/FeaturePythonPyImp.inl | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/FeaturePythonPyImp.h b/src/App/FeaturePythonPyImp.h index 3b0d56e328..549217cc3b 100644 --- a/src/App/FeaturePythonPyImp.h +++ b/src/App/FeaturePythonPyImp.h @@ -46,7 +46,9 @@ virtual ~_class_(); \ }; -#if PY_VERSION_HEX >= 0x030c0000 +#if PY_VERSION_HEX >= 0x030d0000 +#define PYTHON_TYPE_SLOTS 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#elif PY_VERSION_HEX >= 0x030c0000 #define PYTHON_TYPE_SLOTS 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 #else #define PYTHON_TYPE_SLOTS 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/src/App/FeaturePythonPyImp.inl b/src/App/FeaturePythonPyImp.inl index 95f53ef790..fd7418e347 100644 --- a/src/App/FeaturePythonPyImp.inl +++ b/src/App/FeaturePythonPyImp.inl @@ -83,6 +83,9 @@ PyTypeObject FeaturePythonPyT::Type = { #if PY_VERSION_HEX >= 0x030c0000 ,0 /*tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d0000 + ,0 /*tp_versions_used */ +#endif }; template