diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-12 08:05:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12 08:05:05 (GMT) |
commit | 4652d82a51e6530a4f820588a6209d3295963bdb (patch) | |
tree | 6d7055b6c65e2c0adf804f28e95e684d6ce69968 /Doc/c-api/marshal.rst | |
parent | 2f386254e2cf054cc7ee5103b54c1cf16d9fa979 (diff) | |
download | cpython-4652d82a51e6530a4f820588a6209d3295963bdb.zip cpython-4652d82a51e6530a4f820588a6209d3295963bdb.tar.gz cpython-4652d82a51e6530a4f820588a6209d3295963bdb.tar.bz2 |
bpo-29746: Update marshal docs to Python 3. (#547) (#631)
(cherry picked from commit c611a5b1d4fab0123bf622f06c3bfa510221dc32)
Diffstat (limited to 'Doc/c-api/marshal.rst')
-rw-r--r-- | Doc/c-api/marshal.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/marshal.rst b/Doc/c-api/marshal.rst index a6d0f46..c6d1d02 100644 --- a/Doc/c-api/marshal.rst +++ b/Doc/c-api/marshal.rst @@ -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*. |