Commit 8728a053 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #746 from undingen/small_issues2

Fix gc visiting code for running generators
parents f1129a84 bed5aa20
...@@ -406,8 +406,8 @@ extern "C" void generatorGCHandler(GCVisitor* v, Box* b) { ...@@ -406,8 +406,8 @@ extern "C" void generatorGCHandler(GCVisitor* v, Box* b) {
v->visit(g->exception.traceback); v->visit(g->exception.traceback);
if (g->running) { if (g->running) {
v->visitPotentialRange((void**)&g->returnContext, v->visitPotentialRange((void**)g->returnContext,
((void**)&g->returnContext) + sizeof(*g->returnContext) / sizeof(void*)); ((void**)g->returnContext) + sizeof(*g->returnContext) / sizeof(void*));
} else { } else {
// g->context is always set for a running generator, but we can trigger a GC while constructing // g->context is always set for a running generator, but we can trigger a GC while constructing
// a generator in which case we can see a NULL context // a generator in which case we can see a NULL context
......
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