aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/index_pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/index_pool.c')
-rw-r--r--Python/index_pool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/index_pool.c b/Python/index_pool.c
index 007c81a0fc1..520a65938ec 100644
--- a/Python/index_pool.c
+++ b/Python/index_pool.c
@@ -172,6 +172,9 @@ _PyIndexPool_AllocIndex(_PyIndexPool *pool)
else {
index = heap_pop(free_indices);
}
+
+ pool->tlbc_generation++;
+
UNLOCK_POOL(pool);
return index;
}
@@ -180,6 +183,7 @@ void
_PyIndexPool_FreeIndex(_PyIndexPool *pool, int32_t index)
{
LOCK_POOL(pool);
+ pool->tlbc_generation++;
heap_add(&pool->free_indices, index);
UNLOCK_POOL(pool);
}