[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (marshal doc)

victor.stinner python-checkins at python.org
Wed Mar 18 13:59:10 CET 2015


https://hg.python.org/cpython/rev/8d71bcce3046
changeset: 95036:8d71bcce3046
parent: 95034:1e4605542ac4
parent: 95035:acb4d43955f6
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 18 13:59:02 2015 +0100
summary:
 Merge 3.4 (marshal doc)
files:
 Doc/c-api/marshal.rst | 21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Doc/c-api/marshal.rst b/Doc/c-api/marshal.rst
--- a/Doc/c-api/marshal.rst
+++ b/Doc/c-api/marshal.rst
@@ -53,6 +53,8 @@
 for reading. Only a 32-bit value can be read in using this function,
 regardless of the native size of :c:type:`long`.
 
+ On error, raise an exception and return ``-1``.
+
 
 .. c:function:: int PyMarshal_ReadShortFromFile(FILE *file)
 
@@ -60,11 +62,15 @@
 for reading. Only a 16-bit value can be read in using this function,
 regardless of the native size of :c:type:`short`.
 
+ On error, raise an exception and return ``-1``.
+
 
 .. c:function:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file)
 
 Return a Python object from the data stream in a :c:type:`FILE\*` opened for
- reading. On error, sets the appropriate exception (:exc:`EOFError` or
+ reading.
+
+ On error, sets the appropriate exception (:exc:`EOFError` or
 :exc:`TypeError`) and returns *NULL*.
 
 
@@ -76,14 +82,17 @@
 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
- anything else from the file. On error, sets the appropriate exception
- (:exc:`EOFError` or :exc:`TypeError`) and returns *NULL*.
+ anything else from the file.
+
+ On error, sets the appropriate exception (:exc:`EOFError` or
+ :exc:`TypeError`) and returns *NULL*.
 
 
 .. c:function:: PyObject* PyMarshal_ReadObjectFromString(char *string, Py_ssize_t len)
 
 Return a Python object from the data stream in a character buffer
- containing *len* bytes pointed to by *string*. On error, sets the
- appropriate exception (:exc:`EOFError` or :exc:`TypeError`) and returns
- *NULL*.
+ containing *len* bytes pointed to by *string*.
 
+ On error, sets the appropriate exception (:exc:`EOFError` or
+ :exc:`TypeError`) and returns *NULL*.
+
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /