diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-07-20 05:42:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 05:42:02 (GMT) |
commit | 74b5e4ce80858ac5c7d03411cb8cce7e6865f181 (patch) | |
tree | 229fd5a02d8fc5615190ac61e411cebb0c94dae6 | |
parent | be09bae608cae90e50dbf71b585b5ee386fdd952 (diff) | |
download | cpython-74b5e4ce80858ac5c7d03411cb8cce7e6865f181.zip cpython-74b5e4ce80858ac5c7d03411cb8cce7e6865f181.tar.gz cpython-74b5e4ce80858ac5c7d03411cb8cce7e6865f181.tar.bz2 |
gh-95007: Remove the NoneType return converter (GH-95019)
It has confusing semantic which does not provide any benefit (the
only difference is that you should write "return Py_None" instead
of "Py_RETURN_NONE"), it is not currently used, and it is broken.
-rwxr-xr-x | Tools/clinic/clinic.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 0041363..36bfc70 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -3826,17 +3826,6 @@ class CReturnConverter(metaclass=CReturnConverterAutoRegister): add_c_return_converter(CReturnConverter, 'object') -class NoneType_return_converter(CReturnConverter): - def render(self, function, data): - self.declare(data) - data.return_conversion.append(''' -if (_return_value != Py_None) { - goto exit; -} -return_value = Py_None; -Py_INCREF(Py_None); -'''.strip()) - class bool_return_converter(CReturnConverter): type = 'int' |