Message416062
The attached PR makes the following possible (note that the impl has a `void` return type):
/*[clinic input]
_io._IOBase.writelines -> NoneType
lines: object
/
[clinic start generated code]*/
static void
_io__IOBase_writelines_impl(PyObject *self, PyObject *lines)
/*[clinic end generated code: output=f3feca36db72dbd1 input=286ba711cb7291ad]*/
Previously, the return type would be `Object *` with generated replacement of non-Py_None values to NULL on the other side.
So now there is no need to track whether NULL or Py_None should be returned. Or should it be Py_RETURN_NONE? Argument Clinic does it by itself returning NULL on errors and PyNone otherwise:
static PyObject *
_io__IOBase_writelines(PyObject *self, PyObject *lines)
{
PyObject *return_value = NULL;
_io__IOBase_writelines_impl(self, lines);
if (PyErr_Occurred()) {
goto exit;
}
return_value = Py_None;
Py_INCREF(Py_None);
exit:
return return_value;
} |
|
Date |
User |
Action |
Args |
2022-03-26 12:59:28 | arhadthedev | set | recipients:
+ arhadthedev, larry |
2022-03-26 12:59:28 | arhadthedev | set | messageid: <1648299568.03.0.403379659681.issue47128@roundup.psfhosted.org> |
2022-03-26 12:59:28 | arhadthedev | link | issue47128 messages |
2022-03-26 12:59:27 | arhadthedev | create | |
|