diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-21 19:50:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 19:50:20 (GMT) |
commit | 4328dc646517f9251bdf6c827014f01c5229e8d9 (patch) | |
tree | f0b5d3b96cd8f569ff72e55fd7e6e66985d8038d /Include | |
parent | fc32522b081c895f3798e4a16788b800cff08166 (diff) | |
download | cpython-4328dc646517f9251bdf6c827014f01c5229e8d9.zip cpython-4328dc646517f9251bdf6c827014f01c5229e8d9.tar.gz cpython-4328dc646517f9251bdf6c827014f01c5229e8d9.tar.bz2 |
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().
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_moduleobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/internal/pycore_moduleobject.h b/Include/internal/pycore_moduleobject.h index 15a1bcb..31a31e7 100644 --- a/Include/internal/pycore_moduleobject.h +++ b/Include/internal/pycore_moduleobject.h @@ -33,7 +33,7 @@ static inline PyObject* _PyModule_GetDict(PyObject *mod) { PyObject *dict = ((PyModuleObject *)mod) -> md_dict; // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) assert(dict != NULL); - return dict; + return dict; // borrowed reference } PyObject* _Py_module_getattro_impl(PyModuleObject *m, PyObject *name, int suppress); |