mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
_PyGC_generation0 is now a pointer
This commit is contained in:
parent
2880ae53e6
commit
b1094f0b1b
1 changed files with 4 additions and 4 deletions
|
@ -258,7 +258,7 @@ typedef union _gc_head {
|
||||||
long double dummy; /* force worst-case alignment */
|
long double dummy; /* force worst-case alignment */
|
||||||
} PyGC_Head;
|
} PyGC_Head;
|
||||||
|
|
||||||
extern PyGC_Head _PyGC_generation0;
|
extern PyGC_Head *_PyGC_generation0;
|
||||||
|
|
||||||
#define _Py_AS_GC(o) ((PyGC_Head *)(o)-1)
|
#define _Py_AS_GC(o) ((PyGC_Head *)(o)-1)
|
||||||
|
|
||||||
|
@ -268,10 +268,10 @@ extern PyGC_Head _PyGC_generation0;
|
||||||
PyGC_Head *g = _Py_AS_GC(o); \
|
PyGC_Head *g = _Py_AS_GC(o); \
|
||||||
if (g->gc.gc_next != NULL) \
|
if (g->gc.gc_next != NULL) \
|
||||||
Py_FatalError("GC object already in linked list"); \
|
Py_FatalError("GC object already in linked list"); \
|
||||||
g->gc.gc_next = &_PyGC_generation0; \
|
g->gc.gc_next = _PyGC_generation0; \
|
||||||
g->gc.gc_prev = _PyGC_generation0.gc.gc_prev; \
|
g->gc.gc_prev = _PyGC_generation0->gc.gc_prev; \
|
||||||
g->gc.gc_prev->gc.gc_next = g; \
|
g->gc.gc_prev->gc.gc_next = g; \
|
||||||
_PyGC_generation0.gc.gc_prev = g; \
|
_PyGC_generation0->gc.gc_prev = g; \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
/* Tell the GC to stop tracking this object. */
|
/* Tell the GC to stop tracking this object. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue