We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6b291 commit 9df846bCopy full SHA for 9df846b
mlir/lib/Bindings/Python/IRCore.cpp
@@ -2786,6 +2786,14 @@ class PyOpAttributeMap {
2786
PyOperationRef operation;
2787
};
2788
2789
+// bpo-40429 added PyThreadState_GetFrame() to Python 3.9.0b1
2790
+#if PY_VERSION_HEX < 0x030900B1 && !defined(PYPY_VERSION)
2791
+static inline PyFrameObject *PyThreadState_GetFrame(PyThreadState *tstate) {
2792
+ assert(tstate != _Py_NULL);
2793
+ return _Py_CAST(PyFrameObject *, Py_XNewRef(tstate->frame));
2794
+}
2795
+#endif
2796
+
2797
MlirLocation tracebackToLocation(MlirContext ctx) {
2798
size_t framesLimit =
2799
PyGlobals::get().getTracebackLoc().locTracebackFramesLimit();
0 commit comments