summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/objbuffer.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/objbuffer.rst')
-rw-r--r--Doc/c-api/objbuffer.rst34
1 files changed, 24 insertions, 10 deletions
diff --git a/Doc/c-api/objbuffer.rst b/Doc/c-api/objbuffer.rst
index 3c5dc99..e816c3d 100644
--- a/Doc/c-api/objbuffer.rst
+++ b/Doc/c-api/objbuffer.rst
@@ -10,17 +10,26 @@ Buffer Protocol
Returns a pointer to a read-only memory location usable as character-based
input. The *obj* argument must support the single-segment character buffer
- interface. On success, returns ``0``, sets *buffer* to the memory location and
- *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:`TypeError`
- on error.
+ interface. On success, returns ``0``, sets *buffer* to the memory location
+ and *buffer_len* to the buffer length. Returns ``-1`` and sets a
+ :exc:`TypeError` on error.
+
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int *` type for *buffer_len*. This might
+ require changes in your code for properly supporting 64-bit systems.
.. cfunction:: int PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len)
- Returns a pointer to a read-only memory location containing arbitrary data. The
- *obj* argument must support the single-segment readable buffer interface. On
- success, returns ``0``, sets *buffer* to the memory location and *buffer_len* to
- the buffer length. Returns ``-1`` and sets a :exc:`TypeError` on error.
+ Returns a pointer to a read-only memory location containing arbitrary data.
+ The *obj* argument must support the single-segment readable buffer
+ interface. On success, returns ``0``, sets *buffer* to the memory location
+ and *buffer_len* to the buffer length. Returns ``-1`` and sets a
+ :exc:`TypeError` on error.
+
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int *` type for *buffer_len*. This might
+ require changes in your code for properly supporting 64-bit systems.
.. cfunction:: int PyObject_CheckReadBuffer(PyObject *o)
@@ -32,6 +41,11 @@ Buffer Protocol
.. cfunction:: int PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len)
Returns a pointer to a writable memory location. The *obj* argument must
- support the single-segment, character buffer interface. On success, returns
- ``0``, sets *buffer* to the memory location and *buffer_len* to the buffer
- length. Returns ``-1`` and sets a :exc:`TypeError` on error.
+ support the single-segment, character buffer interface. On success,
+ returns ``0``, sets *buffer* to the memory location and *buffer_len* to the
+ buffer length. Returns ``-1`` and sets a :exc:`TypeError` on error.
+
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int *` type for *buffer_len*. This might
+ require changes in your code for properly supporting 64-bit systems.
+