diff --git a/mypyc/lib-rt/mypyc_util.h b/mypyc/lib-rt/mypyc_util.h index 64bf025aec27..27a11ab9f581 100644 --- a/mypyc/lib-rt/mypyc_util.h +++ b/mypyc/lib-rt/mypyc_util.h @@ -38,6 +38,9 @@ // // Py_INCREF and other CPython operations check for immortality. This // can be expensive when we know that an object cannot be immortal. +// +// This optimization cannot be performed in free-threaded mode so we +// fall back to just calling the normal incref/decref operations. static inline void CPy_INCREF_NO_IMM(PyObject *op) {