projects/guix·blob kernel-updates · refs

33 lines · 1.2 KiB

1Only in zeroc-ice-3.6.5: setup.py.orig
2diff --color -ur zeroc-ice-3.6.5.orig/src/Slice.cpp zeroc-ice-3.6.5/src/Slice.cpp
3--- zeroc-ice-3.6.5.orig/src/Slice.cpp 2019-07-31 21:49:38.000000000 +0200
4+++ zeroc-ice-3.6.5/src/Slice.cpp 2023-10-12 10:52:07.029069937 +0200
5@@ -17,12 +17,6 @@
6 #include <Slice/Util.h>
7 #include <IceUtil/Options.h>
8
9-//
10-// Python headers needed for PyEval_EvalCode.
11-//
12-#include <compile.h>
13-#include <eval.h>
14-
15 using namespace std;
16 using namespace IcePy;
17 using namespace Slice;
18diff --color -ur zeroc-ice-3.6.5.orig/src/Util.cpp zeroc-ice-3.6.5/src/Util.cpp
19--- zeroc-ice-3.6.5.orig/src/Util.cpp 2019-07-31 21:49:38.000000000 +0200
20+++ zeroc-ice-3.6.5/src/Util.cpp 2023-10-12 10:49:15.033366926 +0200
21@@ -214,7 +214,12 @@
22 //
23 // Get name of current function.
24 //
25+ // Use PyEval_GetFrame with Pyhthon >= 3.11
26+#if PY_VERSION_HEX >= 0x030B0000
27+ PyFrameObject *f = PyEval_GetFrame();
28+#else
29 PyFrameObject *f = PyThreadState_GET()->frame;
30+#endif
31 PyObjectHandle code = PyObject_GetAttrString(reinterpret_cast<PyObject*>(f), STRCAST("f_code"));
32 assert(code.get());
33 PyObjectHandle func = PyObject_GetAttrString(code.get(), STRCAST("co_name"));