Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,13 @@ check by comparing the reference count field to the immortality reference count.
0, \
(type), \
},
#elif defined(Py_BUILD_CORE)
#else
#define PyObject_HEAD_INIT(type) \
{ \
{ _Py_IMMORTAL_REFCNT }, \
(type) \
},
#else
#define PyObject_HEAD_INIT(type) \
{ \
{ 1 }, \
(type) \
},
#endif /* Py_BUILD_CORE */
#endif

#define PyVarObject_HEAD_INIT(type, size) \
{ \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Statically allocated objects are, by definition, immortal so should be
marked as such regardless of whether they are in extension modules or not.