Skip to content

Commit 1076cfb

Browse files
Tweaks
1 parent 1512ebd commit 1076cfb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/c-api/picklebuffer.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
.. index::
66
pair: object; PickleBuffer
77

8-
PickleBuffer objects
9-
--------------------
8+
Pickle buffer objects
9+
---------------------
1010

1111
.. versionadded:: 3.8
1212

@@ -29,6 +29,7 @@ A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object
2929
.. c:function:: PyObject *PyPickleBuffer_FromObject(PyObject *obj)
3030
3131
Create a pickle buffer from the object *obj*.
32+
3233
This function will fail if *obj* doesn't support the :ref:`buffer protocol <bufferobjects>`.
3334
3435
On success, return a new pickle buffer instance.
@@ -43,10 +44,10 @@ A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object
4344
4445
The returned pointer is valid as long as *picklebuf* is alive and has not been
4546
released. The caller must not modify or free the returned :c:type:`Py_buffer`.
47+
If the pickle buffer has been released, raise :exc:`ValueError`.
4648
4749
On success, return a pointer to the buffer view.
4850
On failure, set an exception and return ``NULL``.
49-
If the pickle buffer has been released, raise :exc:`ValueError`.
5051
5152
5253
.. c:function:: int PyPickleBuffer_Release(PyObject *picklebuf)

0 commit comments

Comments
 (0)