diff --git a/Objects/genobject.c b/Objects/genobject.c index 367b4de0272..ccce315ee91 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -10,7 +10,7 @@ static int gen_traverse(PyGenObject *gen, visitproc visit, void *arg) { - Py_VISIT(gen->gi_frame); + Py_VISIT((PyObject *)gen->gi_frame); return 0; }