[Python-Dev] cpython: Fix email post-commit review comments.

Antoine Pitrou solipsis at pitrou.net
Wed Apr 18 16:21:50 CEST 2012


On Wed, 18 Apr 2012 15:31:10 +0200
brian.curtin <python-checkins at python.org> wrote:
> http://hg.python.org/cpython/rev/bf23a6c215f6
> changeset:   76388:bf23a6c215f6
> parent:      76385:6762b943ee59
> user:        Brian Curtin <brian at python.org>
> date:        Wed Apr 18 08:30:51 2012 -0500
> summary:
>   Fix email post-commit review comments.
> 
> Add INCREFs, fix args->kwargs, and a second args==NULL check was removed,
> left over from a merger with another function. Instead, checking msg==NULL
> does what that used to do in a roundabout way.

I don't think INCREFs were necessary, actually.
PyDict_SetItemString doesn't steal a reference.

(and here we see why reference-stealing APIs are a nuisance: because
you never know in advance whether a function will steal a reference or
not, and you have to read the docs for each and every C API call you
make)

Regards

Antoine.




More information about the Python-Dev mailing list