Skip to content

Commit bafabd7

Browse files
committed
fix
1 parent e45778b commit bafabd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/specialize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,8 @@ static inline int
693693
set_cache_verison(uint16_t *old_version, uint32_t new_version)
694694
{
695695
#ifdef Py_GIL_DISABLED
696-
uint32_t old_version_val = read_u32(old_version);
697-
if (!_Py_atomic_compare_exchange_uint32((uint32_t *)old_version, &old_version_val, new_version)) {
696+
uint16_t old_version_val = _Py_atomic_load_uint16_relaxed(old_version);
697+
if (!_Py_atomic_compare_exchange_uint16(old_version, &old_version_val, new_version)) {
698698
return 0;
699699
}
700700
return 1;

0 commit comments

Comments
 (0)