Commit c1dc048b authored by Stefan Behnel's avatar Stefan Behnel

Fix conditional code in __Pyx_PyType_Ready() for Py3.10.

parent 18fc9f76
......@@ -126,10 +126,11 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if PY_VERSION_HEX >= 0x03050000
t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
if (gc_was_enabled) {
#if PY_VERSION_HEX >= 0x030A00b1
#if PY_VERSION_HEX >= 0x030A00b1
if (gc_was_enabled)
PyGC_Enable();
#else
#else
if (gc_was_enabled) {
PyObject *t, *v, *tb;
PyErr_Fetch(&t, &v, &tb);
ret = __Pyx_PyObject_CallMethod0(gc, PYUNICODE("enable"));
......@@ -146,7 +147,7 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
}
}
Py_DECREF(gc);
#endif
#endif
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment