Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(165453)

#17807: Generator cleanup without tp_del

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 7 months ago by pitrou
Modified:
6 years, 7 months ago
Reviewers:
ncoghlan, pje
CC:
Nick Coghlan, AntoinePitrou, Benjamin Peterson, devnull_psf.upfronthosting.co.za, pconnell, isoschiz
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 3

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Include/frameobject.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
Include/genobject.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
Lib/test/test_generators.py View 1 2 3 2 chunks +53 lines, -0 lines 0 comments Download
Lib/test/test_sys.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
Modules/gcmodule.c View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
Objects/frameobject.c View 1 2 3 4 chunks +234 lines, -20 lines 0 comments Download
Objects/genobject.c View 1 2 3 6 chunks +33 lines, -220 lines 0 comments Download

Messages

Total messages: 3
Nick Coghlan
This looks very promising to me - getting to a point where generator cleanup doesn't ...
6 years, 7 months ago #1
PJ Eby
http://bugs.python.org/review/17807/diff/7953/Objects/genobject.c File Objects/genobject.c (right): http://bugs.python.org/review/17807/diff/7953/Objects/genobject.c#newcode21 Objects/genobject.c:21: PyObject *self = (PyObject *) gen; This variable doesn't ...
6 years, 7 months ago #2
AntoinePitrou
6 years, 7 months ago #3
http://bugs.python.org/review/17807/diff/7953/Include/genobject.h
File Include/genobject.h (left):

http://bugs.python.org/review/17807/diff/7953/Include/genobject.h#oldcode36
Include/genobject.h:36: PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);
On 2013/04/21 06:39:45, Nick Coghlan wrote:
> Since there's no leading underscore, we may need to keep a stub version of
this
> that always returns false.

That's true. OTOH, it isn't documented and it doesn't seem used outside of
CPython:
http://code.ohloh.net/search?s="PyGen_NeedsFinalizing"

The function was introduced in http://bugs.python.org/issue1463867, which
doesn't give any rationale for missing a leading underscore. It doesn't look
like the function was intended to be public, at all.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+