summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorJoannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>2019-09-06 15:41:38 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-09-06 15:41:38 (GMT)
commit74b662cf202753d224d82d5503974cce881f7436 (patch)
tree7bf56ecdbf04328895afebce38f01f4b11403461 /Objects
parentd8c93aa5d29d3cab537357018d5806a57452a8fe (diff)
downloadcpython-74b662cf202753d224d82d5503974cce881f7436.zip
cpython-74b662cf202753d224d82d5503974cce881f7436.tar.gz
cpython-74b662cf202753d224d82d5503974cce881f7436.tar.bz2
bpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702)
Remove PyGen_NeedsFinalizing(): it was not documented, tested or used anywhere within CPython after the implementation of PEP 442.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/genobject.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 5e0bfa4..9f490b4 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -819,22 +819,6 @@ PyGen_New(PyFrameObject *f)
return gen_new_with_qualname(&PyGen_Type, f, NULL, NULL);
}
-int
-PyGen_NeedsFinalizing(PyGenObject *gen)
-{
- PyFrameObject *f = gen->gi_frame;
-
- if (f == NULL || f->f_stacktop == NULL)
- return 0; /* no frame or empty blockstack == no finalization */
-
- /* Any (exception-handling) block type requires cleanup. */
- if (f->f_iblock > 0)
- return 1;
-
- /* No blocks, it's safe to skip finalization. */
- return 0;
-}
-
/* Coroutine Object */
typedef struct {