File tree 2 files changed +8
-0
lines changed
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.
25
25
the least-significant 32 bits of *value *; regardless of the size of the
26
26
native :c:type: `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
Original file line number Diff line number Diff line change @@ -601,6 +601,10 @@ w_clear_refs(WFILE *wf)
601
601
}
602
602
603
603
/* 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
+ */
604
608
void
605
609
PyMarshal_WriteLongToFile (long x , FILE * fp , int version )
606
610
{
You can’t perform that action at this time.
0 commit comments