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 1a98fa7 commit a3ad3e5Copy full SHA for a3ad3e5
1 file changed
c_src/py_nif.h
@@ -136,6 +136,16 @@
136
#endif
137
138
139
+/**
140
+ * Py_NewRef was added in Python 3.10. Provide compatibility macro for older versions.
141
+ */
142
+#if PY_VERSION_HEX < 0x030A0000
143
+static inline PyObject *Py_NewRef(PyObject *o) {
144
+ Py_INCREF(o);
145
+ return o;
146
+}
147
+#endif
148
+
149
/** @} */
150
151
/* Include subinterpreter pool header for shared-GIL pool model */
0 commit comments