gh-110481: Fix typo in Py_SET_REFCNT() (#112595)

This commit is contained in:
Victor Stinner 2023-12-01 16:54:40 +01:00 committed by GitHub
parent 0daf555c6f
commit a9073564ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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