File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ extern "C" {
8
8
# error "this header requires Py_BUILD_CORE define"
9
9
#endif
10
10
11
+ #define _PyGC_PREV_SHIFT 2
12
+ #define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT)
13
+
11
14
/* GC information is stored BEFORE the object structure. */
12
15
typedef struct {
13
16
// Tagged pointer to next object in the list.
@@ -18,7 +21,7 @@ typedef struct {
18
21
// Lowest two bits are used for flags documented later.
19
22
// Those two bits are made available by the struct's minimum alignment.
20
23
uintptr_t _gc_prev ;
21
- } PyGC_Head Py_ALIGNED (4 );
24
+ } PyGC_Head Py_ALIGNED (1 << _PyGC_PREV_SHIFT );
22
25
23
26
#define _PyGC_Head_UNUSED PyGC_Head
24
27
@@ -142,9 +145,6 @@ static inline void _PyObject_GC_SET_SHARED(PyObject *op) {
142
145
*/
143
146
#define _PyGC_NEXT_MASK_OLD_SPACE_1 1
144
147
145
- #define _PyGC_PREV_SHIFT 2
146
- #define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT)
147
-
148
148
/* set for debugging information */
149
149
#define _PyGC_DEBUG_STATS (1<<0) /* print collection statistics */
150
150
#define _PyGC_DEBUG_COLLECTABLE (1<<1) /* print collectable objects */
You can’t perform that action at this time.
0 commit comments