summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorDino Viehland <dinoviehland@meta.com>2024-04-22 05:57:05 (GMT)
committerGitHub <noreply@github.com>2024-04-22 05:57:05 (GMT)
commit8b541c017ea92040add608b3e0ef8dc85e9e6060 (patch)
tree880ff7c97041f374d21197b1b486686f2d64c998 /Python/specialize.c
parent1446024124fb98c3051199760380685f8a2fd127 (diff)
downloadcpython-8b541c017ea92040add608b3e0ef8dc85e9e6060.zip
cpython-8b541c017ea92040add608b3e0ef8dc85e9e6060.tar.gz
cpython-8b541c017ea92040add608b3e0ef8dc85e9e6060.tar.bz2
gh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)
Make instance attributes stored in inline "dict" thread safe on free-threaded builds
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 5e14bb5..ee51781 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -852,8 +852,7 @@ specialize_dict_access(
instr->op.code = values_op;
}
else {
- PyManagedDictPointer *managed_dict = _PyObject_ManagedDictPointer(owner);
- PyDictObject *dict = managed_dict->dict;
+ PyDictObject *dict = _PyObject_GetManagedDict(owner);
if (dict == NULL || !PyDict_CheckExact(dict)) {
SPECIALIZATION_FAIL(base_op, SPEC_FAIL_NO_DICT);
return 0;