Skip to content

Commit d941a18

Browse files
committed
Update comment and tweak change note
1 parent 76a3572 commit d941a18

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Include/object.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ check by comparing the reference count field to the immortality reference count.
115115
// Kept for backward compatibility. It was needed by Py_TRACE_REFS build.
116116
#define _PyObject_EXTRA_INIT
117117

118-
// Make all internal uses of PyObject_HEAD_INIT immortal while preserving the
119-
// C-API expectation that the refcnt will be set to 1.
118+
/* Make all uses of PyObject_HEAD_INIT immortal.
119+
*
120+
* Statically allocated objects might be shared between
121+
* interpreters, so must be marked as immortal.
122+
*/
120123
#if defined(Py_GIL_DISABLED)
121124
#define PyObject_HEAD_INIT(type) \
122125
{ \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Statically allocated objects are, by definition, immortal so should be
1+
Statically allocated objects are, by definition, immortal so must be
22
marked as such regardless of whether they are in extension modules or not.

0 commit comments

Comments
 (0)