gh-105927: finalize_modules_clear_weaklist() uses _PyWeakref_GET_REF() (#105971)

finalize_modules_clear_weaklist() now holds a strong reference to the
module longer than before: replace PyWeakref_GET_OBJECT() with
_PyWeakref_GET_REF().
This commit is contained in:
Victor Stinner 2023-06-21 21:50:20 +02:00 committed by GitHub
parent fc32522b08
commit 4328dc6465
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -504,7 +504,7 @@ PyModule_GetDict(PyObject *m)
PyErr_BadInternalCall();
return NULL;
}
return _PyModule_GetDict(m);
return _PyModule_GetDict(m); // borrowed reference
}
PyObject*