Skip to content
Merged
Prev Previous commit
Next Next commit
add safe casts
  • Loading branch information
picnixz committed Jan 25, 2025
commit 339a4164cf9940c01e72d0efb5996d55eb388875
2 changes: 1 addition & 1 deletion Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ static PyObject *
clear_locals(PyObject *locals_and_key, PyObject *dummyweakref)
{
PyObject *localweakref = PyTuple_GetItem(locals_and_key, 0);
localobject *self = (localobject *)_PyWeakref_GET_REF(localweakref);
localobject *self = _localobject_CAST(_PyWeakref_GET_REF(localweakref));
if (self == NULL) {
Py_RETURN_NONE;
}
Expand Down