depot/third_party/nixpkgs/pkgs/applications/science/misc/root/root5-python311-fix.patch
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

17 lines
585 B
Diff

diff --git a/bindings/pyroot/src/MethodProxy.cxx b/bindings/pyroot/src/MethodProxy.cxx
--- a/bindings/pyroot/src/MethodProxy.cxx
+++ b/bindings/pyroot/src/MethodProxy.cxx
@@ -4,10 +4,10 @@
// Bindings
#include "PyROOT.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