SF Patch #1463867: Improved generator finalization to allow generators
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
diff --git a/Include/genobject.h b/Include/genobject.h
index f4226ed..1ecd7ad 100644
--- a/Include/genobject.h
+++ b/Include/genobject.h
@@ -28,6 +28,7 @@
#define PyGen_CheckExact(op) ((op)->ob_type == &PyGen_Type)
PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
+PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);
#ifdef __cplusplus
}