8000 gh-95007: Remove the NoneType return converter (GH-95019) · python/cpython@74b5e4c · GitHub
[go: up one dir, main page]

Skip to content

Commit 74b5e4c

Browse files
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.
1 parent be09bae commit 74b5e4c

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Tools/clinic/clinic.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,17 +3826,6 @@ def render(self, function, data):
38263826

38273827
add_c_return_converter(CReturnConverter, 'object')
38283828

3829-
class NoneType_return_converter(CReturnConverter):
3830-
def render(self, function, data):
3831-
self.declare(data)
3832-
data.return_conversion.append('''
3833-
if (_return_value != Py_None) {
3834-
goto exit;
3835-
}
3836-
return_value = Py_None;
3837-
Py_INCREF(Py_None);
3838-
'''.strip())
3839-
38403829
class bool_return_converter(CReturnConverter):
38413830
type = 'int'
38423831

0 commit comments

Comments
 (0)
0