diff options
| author | Phillip J. Eby <pje@telecommunity.com> | 2006-04-10 17:51:05 +0000 |
|---|---|---|
| committer | Phillip J. Eby <pje@telecommunity.com> | 2006-04-10 17:51:05 +0000 |
| commit | 829834ea4e53002f3371d3de92f7388b34f1da57 (patch) | |
| tree | 470e6987f481c48513c390090628f54e02e12e85 /Include/genobject.h | |
| parent | 4571a341dbfd0d9d51230ea81000e21571a3aecf (diff) | |
| download | cpython-829834ea4e53002f3371d3de92f7388b34f1da57.tar.gz | |
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.
Diffstat (limited to 'Include/genobject.h')
| -rw-r--r-- | Include/genobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/genobject.h b/Include/genobject.h index f4226ede42..1ecd7ad773 100644 --- a/Include/genobject.h +++ b/Include/genobject.h @@ -28,6 +28,7 @@ PyAPI_DATA(PyTypeObject) PyGen_Type; #define PyGen_CheckExact(op) ((op)->ob_type == &PyGen_Type) PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *); +PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *); #ifdef __cplusplus } |
