Free threading fixes

This commit is contained in:
Pablo Galindo Salgado 2025-12-06 19:11:21 +00:00
parent 80133a59ff
commit b0adc30759
2 changed files with 30 additions and 19 deletions

View file

@ -2908,7 +2908,7 @@ sys_get_lazy_modules_impl(PyObject *module)
/*[clinic end generated code: output=4c641f8881ba87c0 input=511b3a9682c09282]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
PyObject *lazy_modules_set = interp->imports.lazy_modules_set;
PyObject *lazy_modules_set = FT_ATOMIC_LOAD_PTR_RELAXED(interp->imports.lazy_modules_set);
if (lazy_modules_set == NULL) {
return PySet_New(NULL);
}