gh-105184: document that marshal functions can fail and need to be ch… · DataDog/cpython@ee26ca1 (original) (raw)

Original file line number Diff line number Diff line change
@@ -25,12 +25,16 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
25 25 the least-significant 32 bits of *value*; regardless of the size of the
26 26 native :c:expr:`long` type. *version* indicates the file format.
27 27
28 + This function can fail, in which case it sets the error indicator.
29 + Use :c:func:`PyErr_Occurred` to check for that.
28 30
29 31 .. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
30 32
31 33 Marshal a Python object, *value*, to *file*.
32 34 *version* indicates the file format.
33 35
36 + This function can fail, in which case it sets the error indicator.
37 + Use :c:func:`PyErr_Occurred` to check for that.
34 38
35 39 .. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
36 40