8000 gh-115999: Add free-threaded specialization for ``TO_BOOL`` by corona10 · Pull Request #126616 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115999: Add free-threaded specialization for TO_BOOL #126616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Nov 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
corona10 committed Nov 9, 2024
commit bafabd76e83b0a210f2f25b3e3e218b1b89cc4f7
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
Loading
You can’t perform that action at this time.
0