Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tweaks
  • Loading branch information
StanFromIreland committed Nov 16, 2025
commit 1076cfb5b5ffb40a0b9b41bb3cdcb02b89b8cbd4
7 changes: 4 additions & 3 deletions Doc/c-api/picklebuffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.. index::
pair: object; PickleBuffer

PickleBuffer objects
--------------------
Pickle buffer objects
---------------------

.. versionadded:: 3.8

Expand All @@ -29,6 +29,7 @@ A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object
.. c:function:: PyObject *PyPickleBuffer_FromObject(PyObject *obj)

Create a pickle buffer from the object *obj*.

This function will fail if *obj* doesn't support the :ref:`buffer protocol <bufferobjects>`.
Comment thread
StanFromIreland marked this conversation as resolved.

On success, return a new pickle buffer instance.
Expand All @@ -43,10 +44,10 @@ A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object

The returned pointer is valid as long as *picklebuf* is alive and has not been
released. The caller must not modify or free the returned :c:type:`Py_buffer`.
If the pickle buffer has been released, raise :exc:`ValueError`.

On success, return a pointer to the buffer view.
On failure, set an exception and return ``NULL``.
If the pickle buffer has been released, raise :exc:`ValueError`.


.. c:function:: int PyPickleBuffer_Release(PyObject *picklebuf)
Expand Down
Loading