Skip to content

Commit f8bb55d

Browse files
Review
1 parent 7f68a90 commit f8bb55d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Doc/c-api/picklebuffer.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,42 @@ A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object
1616

1717
.. c:var:: PyTypeObject PyPickleBuffer_Type
1818
19-
This instance of :c:type:`PyTypeObject` represents the Python PickleBuffer type.
19+
This instance of :c:type:`PyTypeObject` represents the Python pickle buffer type.
2020
This is the same object as :class:`pickle.PickleBuffer` in the Python layer.
2121

2222

2323
.. c:function:: int PyPickleBuffer_Check(PyObject *op)
2424
25-
Return true if *op* is a PickleBuffer instance.
25+
Return true if *op* is a pickle buffer instance.
2626
This function always succeeds.
2727
2828
2929
.. c:function:: PyObject *PyPickleBuffer_FromObject(PyObject *obj)
3030
31-
Create a PickleBuffer from the object *obj*.
32-
*obj* must support the :ref:`buffer protocol <bufferobjects>`.
31+
Create a pickle buffer from the object *obj*.
32+
This function will fail if *obj* doesn't support the :ref:`buffer protocol <bufferobjects>`.
3333
34-
On success, return a new PickleBuffer instance.
34+
On success, return a new pickle buffer instance.
3535
On failure, set an exception and return ``NULL``.
3636
3737
Analogous to calling :class:`pickle.PickleBuffer` with *obj* in Python.
3838
3939
4040
.. c:function:: const Py_buffer *PyPickleBuffer_GetBuffer(PyObject *picklebuf)
4141
42-
Get a pointer to the underlying :c:type:`Py_buffer` that the PickleBuffer wraps.
43-
*picklebuf* must be a PickleBuffer instance.
42+
Get a pointer to the underlying :c:type:`Py_buffer` that the pickle buffer wraps.
4443
4544
On success, return a pointer to the buffer view.
4645
The returned pointer is valid as long as *picklebuf* is alive and has not been
4746
released. The caller must not modify or free the returned :c:type:`Py_buffer`.
4847
4948
On failure, set an exception and return ``NULL``.
50-
If the PickleBuffer has been released, raise :exc:`ValueError`.
49+
If the pickle buffer has been released, raise :exc:`ValueError`.
5150
5251
5352
.. c:function:: int PyPickleBuffer_Release(PyObject *picklebuf)
5453
55-
Release the underlying buffer held by the PickleBuffer.
54+
Release the underlying buffer held by the pickle buffer.
5655
5756
Return ``0`` on success. On failure, set an exception and return ``-1``.
5857

0 commit comments

Comments
 (0)