]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110481: Fix typo in Py_SET_REFCNT() (#112595)
authorVictor Stinner <vstinner@python.org>
Fri, 1 Dec 2023 15:54:40 +0000 (16:54 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Dec 2023 15:54:40 +0000 (15:54 +0000)
Include/object.h

index 86fcba21caa9c8a173b401bc88985f85052e29b4..81f777ad21f2f9f113a98217f65b5ec3df56874d 100644 (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