summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2023-11-20 13:52:00 (GMT)
committerGitHub <noreply@github.com>2023-11-20 13:52:00 (GMT)
commit3b3ec0d77f0f836cbe5ff1ab97efcc8b7ed5d787 (patch)
treef79786b7e97064b1a71840ac9c1421e87d6adc15 /Objects
parent1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0 (diff)
downloadcpython-3b3ec0d77f0f836cbe5ff1ab97efcc8b7ed5d787.zip
cpython-3b3ec0d77f0f836cbe5ff1ab97efcc8b7ed5d787.tar.gz
cpython-3b3ec0d77f0f836cbe5ff1ab97efcc8b7ed5d787.tar.bz2
gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)
Rename Py_NOGIL to Py_GIL_DISABLED
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 1f5b2b4..d145674 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -296,7 +296,7 @@ _Py_DecRef(PyObject *o)
Py_DECREF(o);
}
-#ifdef Py_NOGIL
+#ifdef Py_GIL_DISABLED
# ifdef Py_REF_DEBUG
static inline int
is_shared_refcnt_dead(Py_ssize_t shared)
@@ -414,7 +414,7 @@ _Py_ExplicitMergeRefcount(PyObject *op, Py_ssize_t extra)
_Py_atomic_store_uintptr_relaxed(&op->ob_tid, 0);
return refcnt;
}
-#endif /* Py_NOGIL */
+#endif /* Py_GIL_DISABLED */
/**************************************/
@@ -2359,7 +2359,7 @@ new_reference(PyObject *op)
_PyTraceMalloc_NewReference(op);
}
// Skip the immortal object check in Py_SET_REFCNT; always set refcnt to 1
-#if !defined(Py_NOGIL)
+#if !defined(Py_GIL_DISABLED)
op->ob_refcnt = 1;
#else
op->ob_tid = _Py_ThreadId();