dacf8d7
From 484deb056dacf768aba4954073b41105c431bffc Mon Sep 17 00:00:00 2001
dacf8d7
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
dacf8d7
Date: Thu, 9 Jun 2022 12:24:07 +0200
dacf8d7
Subject: [PATCH] [PyROOT] code.h must not be included directly in 3.11
dacf8d7
dacf8d7
It has been moved to Include/cpython, and it is included by Python.h.
dacf8d7
dacf8d7
See:
dacf8d7
https://docs.python.org/3.11/whatsnew/3.11.html
dacf8d7
---
dacf8d7
 bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx | 6 +++---
dacf8d7
 1 file changed, 3 insertions(+), 3 deletions(-)
dacf8d7
dacf8d7
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
dacf8d7
index 59997e390d..28bbd635c2 100644
dacf8d7
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
dacf8d7
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
dacf8d7
@@ -1,10 +1,10 @@
dacf8d7
 // Bindings
dacf8d7
 #include "CPyCppyy.h"
dacf8d7
 #include "structmember.h"    // from Python
dacf8d7
-#if PY_VERSION_HEX >= 0x02050000
dacf8d7
-#include "code.h"            // from Python
dacf8d7
-#else
dacf8d7
+#if PY_VERSION_HEX < 0x02050000
dacf8d7
 #include "compile.h"         // from Python
dacf8d7
+#elif PY_VERSION_HEX < 0x030b0000
dacf8d7
+#include "code.h"            // from Python
dacf8d7
 #endif
dacf8d7
 #ifndef CO_NOFREE
dacf8d7
 // python2.2 does not have CO_NOFREE defined
dacf8d7
-- 
dacf8d7
2.36.1
dacf8d7