Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1094f0

Browse files
committed
_PyGC_generation0 is now a pointer
1 parent 2880ae5 commit b1094f0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Include/objimpl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ typedef union _gc_head {
258258
long double dummy; /* force worst-case alignment */
259259
} PyGC_Head;
260260

261-
extern PyGC_Head _PyGC_generation0;
261+
extern PyGC_Head *_PyGC_generation0;
262262

263263
#define _Py_AS_GC(o) ((PyGC_Head *)(o)-1)
264264

@@ -268,10 +268,10 @@ extern PyGC_Head _PyGC_generation0;
268268
PyGC_Head *g = _Py_AS_GC(o); \
269269
if (g->gc.gc_next != NULL) \
270270
Py_FatalError("GC object already in linked list"); \
271-
g->gc.gc_next = &_PyGC_generation0; \
272-
g->gc.gc_prev = _PyGC_generation0.gc.gc_prev; \
271+
g->gc.gc_next = _PyGC_generation0; \
272+
g->gc.gc_prev = _PyGC_generation0->gc.gc_prev; \
273273
g->gc.gc_prev->gc.gc_next = g; \
274-
_PyGC_generation0.gc.gc_prev = g; \
274+
_PyGC_generation0->gc.gc_prev = g; \
275275
} while (0);
276276

277277
/* Tell the GC to stop tracking this object. */

0 commit comments

Comments
 (0)