8000 gh-133931: Introduce _PyObject_XSetRefDelayed to replace Py_XSETREF by corona10 · Pull Request #134377 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133931: Introduce _PyObject_XSetRefDelayed to replace Py_XSETREF #134377

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 21 commits into from
Jun 17, 2025
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
nit
  • Loading branch information
corona10 committed Jun 7, 2025
commit 628732235edf858bc4d80e6522d3d43baccc8ff7
4 changes: 2 additions & 2 deletions Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,14 +1237,14 @@ _PyObject_XSetRefDelayed(PyObject **ptr, PyObject *value)
{
PyObject *old = *ptr;
FT_ATOMIC_STORE_PTR_RELEASE(*ptr, value);
if (old == NULL) {
if (old == _Py_NULL) {
return;
}
if (!_Py_IsImmortal(old)) {
_PyObject_XDecRefDelayed(old);
}
else {
Py_XDECREF(old);
Py_DECREF(old);
}
}
#endif
Expand Down
Loading
0