Closed
Description
As discussed in capi-workgroup/problems#20, there are functions in the C API that do not have a way to report error (void return type).
Some of them actually set the error indicator in some cases, and the only way to know it to check PyErr_Occurred()
. In other cases the functions currently do not have error cases, but the lack of return value is still a problem in case we want to evolve them in the future and need to report errors.
We will use this issue to fix the straightforward ones, while more complicated ones may spawn their own issues.
Linked PRs
- gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred #105185
- [3.12] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105218
- [3.11] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105219
- [3.10] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105220
- [3.9] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105221
- [3.8] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105222
- [3.7] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) #105223
- gh-105184: add return value indicating success/failure for PyMarshal_WriteLongToFile and PyMarshal_WriteObjectToFile #105233