Thanks to visit codestin.com Credit goes to github.com
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 540c470 commit b30738cCopy full SHA for b30738c
1 file changed
pythoncapi_compat.h
@@ -13,9 +13,11 @@ extern "C" {
13
#endif
14
15
#include <Python.h>
16
-#include "frameobject.h" // PyFrameObject
+#include "frameobject.h" // PyFrameObject, PyFrame_GetBack()
17
18
-// bpo-42262 added Py_NewRef() and Py_XNewRef()
+
19
+// bpo-42262 added Py_NewRef() and Py_XNewRef() to Python 3.10.0a3
20
+#if PY_VERSION_HEX < 0x030a00A3
21
static inline PyObject* Py_NewRef(PyObject *obj)
22
{
23
Py_INCREF(obj);
@@ -27,6 +29,8 @@ static inline PyObject* Py_XNewRef(PyObject *obj)
27
29
Py_XINCREF(obj);
28
30
return obj;
31
}
32
+#endif
33
34
35
// bpo-39573: Py_TYPE(), Py_REFCNT() and Py_SIZE() can no longer be used
36
// as l-value in Python 3.10.
0 commit comments