@@ -386,6 +386,7 @@ test_calls(PyObject *Py_UNUSED(module), PyObject* Py_UNUSED(ignored))
386386}
387387
388388
389+ #if !(defined(Py_LIMITED_API ) && PY_VERSION_HEX < 0x030A0000 ) && !defined(PYPY_VERSION )
389390static PyObject *
390391test_gc (PyObject * Py_UNUSED (module ), PyObject * Py_UNUSED (ignored ))
391392{
@@ -394,21 +395,18 @@ test_gc(PyObject *Py_UNUSED(module), PyObject* Py_UNUSED(ignored))
394395 return NULL ;
395396 }
396397
397- #if !(defined(Py_LIMITED_API ) && PY_VERSION_HEX < 0x030900A6 ) && !defined(PYPY_VERSION )
398398 // test PyObject_GC_IsTracked()
399399 int tracked = PyObject_GC_IsTracked (tuple );
400400 assert (tracked );
401- #endif
402401
403- #if !(defined(Py_LIMITED_API ) && PY_VERSION_HEX < 0x030900A6 ) && !defined(PYPY_VERSION )
404402 // test PyObject_GC_IsFinalized()
405403 int finalized = PyObject_GC_IsFinalized (tuple );
406404 assert (!finalized );
407- #endif
408405
409406 Py_DECREF (tuple );
410407 Py_RETURN_NONE ;
411408}
409+ #endif
412410
413411
414412static int
@@ -2547,7 +2545,9 @@ static struct PyMethodDef methods[] = {
25472545#endif
25482546 {"test_interpreter" , test_interpreter , METH_NOARGS , _Py_NULL },
25492547 {"test_calls" , test_calls , METH_NOARGS , _Py_NULL },
2548+ #if !(defined (Py_LIMITED_API ) && PY_VERSION_HEX < 0x030A0000 ) && !defined (PYPY_VERSION )
25502549 {"test_gc" , test_gc , METH_NOARGS , _Py_NULL },
2550+ #endif
25512551 {"test_module" , test_module , METH_NOARGS , _Py_NULL },
25522552#if ((PY_VERSION_HEX <= 0x030B00A1 || 0x030B00A7 <= PY_VERSION_HEX ) \
25532553 && !defined (PYPY_VERSION ) && !defined (Py_LIMITED_API ))
0 commit comments