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