Bug report
Any possible first errors will be overwritten by following ones:
|
result = PyStructSequence_New((PyTypeObject *)WaitidResultType); |
|
if (!result) |
|
return NULL; |
|
|
|
PyStructSequence_SET_ITEM(result, 0, PyLong_FromPid(si.si_pid)); |
|
PyStructSequence_SET_ITEM(result, 1, _PyLong_FromUid(si.si_uid)); |
|
PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong((long)(si.si_signo))); |
|
PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong((long)(si.si_status))); |
|
PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong((long)(si.si_code))); |
|
if (PyErr_Occurred()) { |
|
Py_DECREF(result); |
|
return NULL; |
|
} |
|
|
|
return result; |
I propose to use our custom macro for this as well.
Linked PRs
Bug report
Any possible first errors will be overwritten by following ones:
cpython/Modules/posixmodule.c
Lines 9731 to 9745 in 40b79ef
I propose to use our custom macro for this as well.
Linked PRs
os_waitid_implinposixmodule#116449os_waitid_implinposixmodule(GH-116449) #116451os_waitid_implinposixmodule(GH-116449) #116453