summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_object.h')
-rw-r--r--Include/internal/pycore_object.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index d4f66b6..1bb2da7 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -14,9 +14,14 @@ extern "C" {
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_runtime.h" // _PyRuntime
+/* This value provides *effective* immortality, meaning the object should never
+ be deallocated (until runtime finalization). See PEP 683 for more details about
+ immortality, as well as a proposed mechanism for proper immortality. */
+#define _PyObject_IMMORTAL_REFCNT 999999999
+
#define _PyObject_IMMORTAL_INIT(type) \
{ \
- .ob_refcnt = 999999999, \
+ .ob_refcnt = _PyObject_IMMORTAL_REFCNT, \
.ob_type = (type), \
}
#define _PyVarObject_IMMORTAL_INIT(type, size) \