mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-07 06:40:06 +00:00
devel/py-ice: Unbreak build
This commit is contained in:
parent
3f7756e2ea
commit
81a7884cfd
15
devel/ice/files/patch-python_modules_IcePy_Slice.cpp
Normal file
15
devel/ice/files/patch-python_modules_IcePy_Slice.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
--- python/modules/IcePy/Slice.cpp.orig 2024-06-05 08:43:42 UTC
|
||||
+++ python/modules/IcePy/Slice.cpp
|
||||
@@ -20,8 +20,12 @@
|
||||
//
|
||||
// Python headers needed for PyEval_EvalCode.
|
||||
//
|
||||
+#if PY_VERSION_HEX >= 0x02050000 && PY_VERSION_HEX < 0x030B0000
|
||||
#include <compile.h>
|
||||
#include <eval.h>
|
||||
+#else
|
||||
+#include <compile.h>
|
||||
+#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace IcePy;
|
14
devel/ice/files/patch-python_modules_IcePy_Util.cpp
Normal file
14
devel/ice/files/patch-python_modules_IcePy_Util.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
--- python/modules/IcePy/Util.cpp.orig 2024-06-05 08:44:17 UTC
|
||||
+++ python/modules/IcePy/Util.cpp
|
||||
@@ -214,7 +214,11 @@ IcePy::getFunction()
|
||||
//
|
||||
// Get name of current function.
|
||||
//
|
||||
+#if PY_VERSION_HEX >= 0x02050000 && PY_VERSION_HEX < 0x030B0000
|
||||
PyFrameObject *f = PyThreadState_GET()->frame;
|
||||
+#else
|
||||
+ PyFrameObject *f = PyThreadState_GetFrame(PyThreadState_GET());
|
||||
+#endif
|
||||
PyObjectHandle code = PyObject_GetAttrString(reinterpret_cast<PyObject*>(f), STRCAST("f_code"));
|
||||
assert(code.get());
|
||||
PyObjectHandle func = PyObject_GetAttrString(code.get(), STRCAST("co_name"));
|
Loading…
Reference in New Issue
Block a user