mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.11] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105219)
gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a1
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
a5d2b546c1
commit
8de607ab1c
2 changed files with 8 additions and 0 deletions
|
@ -25,12 +25,16 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
|
|||
the least-significant 32 bits of *value*; regardless of the size of the
|
||||
native :c:expr:`long` type. *version* indicates the file format.
|
||||
|
||||
This function can fail, in which case it sets the error indicator.
|
||||
Use :c:func:`PyErr_Occurred` to check for that.
|
||||
|
||||
.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
|
||||
|
||||
Marshal a Python object, *value*, to *file*.
|
||||
*version* indicates the file format.
|
||||
|
||||
This function can fail, in which case it sets the error indicator.
|
||||
Use :c:func:`PyErr_Occurred` to check for that.
|
||||
|
||||
.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue