[New-bugs-announce] [issue28999] Use Py_RETURN_NONE and like

Serhiy Storchaka report at bugs.python.org
Sat Dec 17 05:09:47 EST 2016


New submission from Serhiy Storchaka:

In the comment to issue28765 patch Victor suggested to replace "Py_INCREF(Py_None); return Py_None;" with "Py_RETURN_NONE;".

Here is a Coccinelle [1] semantic patch that replaces all returns of new references to None, True or False with macros Py_RETURN_NONE, Py_RETURN_TRUE or Py_RETURN_FALSE correspondingly.

[1] http://coccinelle.lip6.fr/

----------
components: Extension Modules, Interpreter Core
files: py_return.cocci
messages: 283480
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use Py_RETURN_NONE and like
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45936/py_return.cocci

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28999>
_______________________________________


More information about the New-bugs-announce mailing list