Skip to content

Commit

Permalink
pythongh-110481: Fix typo in Py_SET_REFCNT() (python#112595)
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner authored and Glyphack committed Jan 27, 2024
1 parent 22ab17e commit 33fba34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
if (_Py_IsOwnedByCurrentThread(ob)) {
if ((size_t)refcnt > (size_t)UINT32_MAX) {
// On overflow, make the object immortal
op->ob_tid = _Py_UNOWNED_TID;
op->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
op->ob_ref_shared = 0;
ob->ob_tid = _Py_UNOWNED_TID;
ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
ob->ob_ref_shared = 0;
}
else {
// Set local refcount to desired refcount and shared refcount
Expand Down

0 comments on commit 33fba34

Please sign in to comment.