Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Nov 9, 2024
1 parent e45778b commit bafabd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,8 @@ static inline int
set_cache_verison(uint16_t *old_version, uint32_t new_version)
{
#ifdef Py_GIL_DISABLED
uint32_t old_version_val = read_u32(old_version);
if (!_Py_atomic_compare_exchange_uint32((uint32_t *)old_version, &old_version_val, new_version)) {
uint16_t old_version_val = _Py_atomic_load_uint16_relaxed(old_version);
if (!_Py_atomic_compare_exchange_uint16(old_version, &old_version_val, new_version)) {
return 0;
}
return 1;
Expand Down

0 comments on commit bafabd7

Please sign in to comment.