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.
This commit is contained in:
Serhiy Storchaka 2022-07-20 08:42:02 +03:00 committed by GitHub
parent be09bae608
commit 74b5e4ce80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 11 deletions

View File

@ -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'