File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed 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.
2525 the least-significant 32 bits of *value *; regardless of the size of the
2626 native :c:type: `long ` type. *version * indicates the file format.
2727
28+ This function can fail, in which case it sets the error indicator.
29+ Use :c:func: `PyErr_Occurred ` to check for that.
2830
2931.. c :function :: void PyMarshal_WriteObjectToFile (PyObject *value, FILE *file, int version)
3032
3133 Marshal a Python object, *value *, to *file *.
3234 *version * indicates the file format.
3335
36+ This function can fail, in which case it sets the error indicator.
37+ Use :c:func: `PyErr_Occurred ` to check for that.
3438
3539.. c :function :: PyObject* PyMarshal_WriteObjectToString (PyObject *value, int version)
3640
Original file line number Diff line number Diff line change @@ -601,6 +601,10 @@ w_clear_refs(WFILE *wf)
601601}
602602
603603/* version currently has no effect for writing ints. */
604+ /* Note that while the documentation states that this function
605+ * can error, currently it never does. Setting an exception in
606+ * this function should be regarded as an API-breaking change.
607+ */
604608void
605609PyMarshal_WriteLongToFile (long x , FILE * fp , int version )
606610{
You can’t perform that action at this time.
0 commit comments