Commit 9ffdeadd authored by Marius Wachtler's avatar Marius Wachtler

Merge pull request #1202 from undingen/const_generation0

microptimization: mark _PyGC_generation0 as having a const address
parents e335b4c0 938b0190
......@@ -260,7 +260,7 @@ typedef union _gc_head {
long double dummy; /* force worst-case alignment */
} PyGC_Head;
extern PyGC_Head *_PyGC_generation0;
extern PyGC_Head * const _PyGC_generation0;
#define _Py_AS_GC(o) ((PyGC_Head *)(o)-1)
......
......@@ -47,7 +47,7 @@ static struct gc_generation generations[NUM_GENERATIONS] = {
{{{GEN_HEAD(2), GEN_HEAD(2), 0}}, 10, 0},
};
PyGC_Head *_PyGC_generation0 = GEN_HEAD(0);
PyGC_Head * const _PyGC_generation0 = GEN_HEAD(0);
static int enabled = 1; /* automatic collection enabled? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment