mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[3.13] gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict (GH-128297) (GH-129979)
(cherry picked from commit 47d2cb8eb7)
Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
This commit is contained in:
parent
a38bacd41f
commit
052632279d
1 changed files with 4 additions and 0 deletions
|
|
@ -1692,7 +1692,11 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
|
|||
else {
|
||||
PyObject **dictptr = _PyObject_ComputedDictPointer(obj);
|
||||
if (dictptr) {
|
||||
#ifdef Py_GIL_DISABLED
|
||||
dict = _Py_atomic_load_ptr_acquire(dictptr);
|
||||
#else
|
||||
dict = *dictptr;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue