cpython: acb4d43955f6 (original) (raw)

Mercurial > cpython

changeset 95035:acb4d43955f6 3.4

Issue #19428: Document that PyMarshal_ReadLongFromFile() and PyMarshal_ReadShortFromFile() can fail. [#19428]

Victor Stinner victor.stinner@gmail.com
date Wed, 18 Mar 2015 13:58:49 +0100
parents 6f7ed6e95ea8
children 8d71bcce3046 51341af466e3
files Doc/c-api/marshal.rst
diffstat 1 files changed, 15 insertions(+), 6 deletions(-)[+] [-] Doc/c-api/marshal.rst 21

line wrap: on

line diff

--- a/Doc/c-api/marshal.rst +++ b/Doc/c-api/marshal.rst @@ -53,6 +53,8 @@ written using these routines? for reading. Only a 32-bit value can be read in using this function, regardless of the native size of :c:type:long.

.. c:function:: int PyMarshal_ReadShortFromFile(FILE *file) @@ -60,11 +62,15 @@ written using these routines? for reading. Only a 16-bit value can be read in using this function, regardless of the native size of :c:type:short.

.. c:function:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file) Return a Python object from the data stream in a :c:type:FILE\* opened for

@@ -76,14 +82,17 @@ written using these routines? aggressively load file data into memory so that the de-serialization can operate from data in memory rather than reading a byte at a time from the file. Only use these variant if you are certain that you won't be reading

.. c:function:: PyObject* PyMarshal_ReadObjectFromString(char *string, Py_ssize_t len) Return a Python object from the data stream in a character buffer