summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/marshal.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-06 10:11:56 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-06 10:11:56 (GMT)
commit60203b41b03d03361754d264543d5fbe6259eb25 (patch)
tree005d0d6be6437244ae360ebc0d65fa7b149a8093 /Doc/c-api/marshal.rst
parent64a41edb039afee683d69bd6f72e3709ff11bd93 (diff)
downloadcpython-60203b41b03d03361754d264543d5fbe6259eb25.zip
cpython-60203b41b03d03361754d264543d5fbe6259eb25.tar.gz
cpython-60203b41b03d03361754d264543d5fbe6259eb25.tar.bz2
Migrate to Sphinx 1.0 C language constructs.
Diffstat (limited to 'Doc/c-api/marshal.rst')
-rw-r--r--Doc/c-api/marshal.rst34
1 files changed, 17 insertions, 17 deletions
diff --git a/Doc/c-api/marshal.rst b/Doc/c-api/marshal.rst
index 04b0b88..da402a8 100644
--- a/Doc/c-api/marshal.rst
+++ b/Doc/c-api/marshal.rst
@@ -19,20 +19,20 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
*Py_MARSHAL_VERSION* indicates the current file format (currently 2).
-.. cfunction:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)
+.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)
- Marshal a :ctype:`long` integer, *value*, to *file*. This will only write
+ Marshal a :c:type:`long` integer, *value*, to *file*. This will only write
the least-significant 32 bits of *value*; regardless of the size of the
- native :ctype:`long` type. *version* indicates the file format.
+ native :c:type:`long` type. *version* indicates the file format.
-.. cfunction:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
+.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
Marshal a Python object, *value*, to *file*.
*version* indicates the file format.
-.. cfunction:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
+.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
Return a string object containing the marshalled representation of *value*.
*version* indicates the file format.
@@ -47,31 +47,31 @@ no error. What's the right way to tell? Should only non-negative values be
written using these routines?
-.. cfunction:: long PyMarshal_ReadLongFromFile(FILE *file)
+.. c:function:: long PyMarshal_ReadLongFromFile(FILE *file)
- Return a C :ctype:`long` from the data stream in a :ctype:`FILE\*` opened
+ Return a C :c:type:`long` from the data stream in a :c:type:`FILE\*` opened
for reading. Only a 32-bit value can be read in using this function,
- regardless of the native size of :ctype:`long`.
+ regardless of the native size of :c:type:`long`.
-.. cfunction:: int PyMarshal_ReadShortFromFile(FILE *file)
+.. c:function:: int PyMarshal_ReadShortFromFile(FILE *file)
- Return a C :ctype:`short` from the data stream in a :ctype:`FILE\*` opened
+ Return a C :c:type:`short` from the data stream in a :c:type:`FILE\*` opened
for reading. Only a 16-bit value can be read in using this function,
- regardless of the native size of :ctype:`short`.
+ regardless of the native size of :c:type:`short`.
-.. cfunction:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file)
+.. c:function:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file)
- Return a Python object from the data stream in a :ctype:`FILE\*` opened for
+ 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
:exc:`TypeError`) and returns *NULL*.
-.. cfunction:: PyObject* PyMarshal_ReadLastObjectFromFile(FILE *file)
+.. c:function:: PyObject* PyMarshal_ReadLastObjectFromFile(FILE *file)
- Return a Python object from the data stream in a :ctype:`FILE\*` opened for
- reading. Unlike :cfunc:`PyMarshal_ReadObjectFromFile`, this function
+ Return a Python object from the data stream in a :c:type:`FILE\*` opened for
+ reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function
assumes that no further objects will be read from the file, allowing it to
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
@@ -80,7 +80,7 @@ written using these routines?
(:exc:`EOFError` or :exc:`TypeError`) and returns *NULL*.
-.. cfunction:: PyObject* PyMarshal_ReadObjectFromString(char *string, Py_ssize_t len)
+.. 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