mirror of
https://github.com/python/cpython.git
synced 2025-10-05 22:51:56 +00:00
(cherry picked from commit c611a5b1d4
)
This commit is contained in:
parent
be31a83730
commit
f12f820ef8
4 changed files with 31 additions and 29 deletions
|
@ -34,7 +34,7 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
|
|||
|
||||
.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
|
||||
|
||||
Return a string object containing the marshalled representation of *value*.
|
||||
Return a bytes object containing the marshalled representation of *value*.
|
||||
*version* indicates the file format.
|
||||
|
||||
|
||||
|
@ -88,10 +88,10 @@ written using these routines?
|
|||
:exc:`TypeError`) and returns *NULL*.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyMarshal_ReadObjectFromString(const char *string, Py_ssize_t len)
|
||||
.. c:function:: PyObject* PyMarshal_ReadObjectFromString(const char *data, Py_ssize_t len)
|
||||
|
||||
Return a Python object from the data stream in a character buffer
|
||||
containing *len* bytes pointed to by *string*.
|
||||
Return a Python object from the data stream in a byte buffer
|
||||
containing *len* bytes pointed to by *data*.
|
||||
|
||||
On error, sets the appropriate exception (:exc:`EOFError` or
|
||||
:exc:`TypeError`) and returns *NULL*.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue