summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/buffer.rst
diff options
context:
space:
mode:
authorJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-04-25 17:59:03 (GMT)
committerJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-04-25 17:59:03 (GMT)
commit089c5cdd09b2474194a40b4943dff9359db4969c (patch)
tree74321a9daa301c65abc8faa14845b28a95f9a085 /Doc/c-api/buffer.rst
parente09f161618517b4ec9ddbe4508e08a41e72754e9 (diff)
downloadcpython-089c5cdd09b2474194a40b4943dff9359db4969c.zip
cpython-089c5cdd09b2474194a40b4943dff9359db4969c.tar.gz
cpython-089c5cdd09b2474194a40b4943dff9359db4969c.tar.bz2
Issue #4129: Belatedly document which C API functions had their argument(s) or
return type changed from int or int * to Py_ssize_t or Py_ssize_t * as this might cause problems on 64-bit platforms.
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rw-r--r--Doc/c-api/buffer.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 1bba495..1e80abc 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -376,6 +376,11 @@ could be used to pass around structured data in its native, in-memory format.
then the new buffer's contents extend to the length of the *base* object's
exported buffer data.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *offset* and *size*. This
+ might require changes in your code for properly supporting 64-bit
+ systems.
+
.. cfunction:: PyObject* PyBuffer_FromReadWriteObject(PyObject *base, Py_ssize_t offset, Py_ssize_t size)
@@ -383,6 +388,11 @@ could be used to pass around structured data in its native, in-memory format.
those for :cfunc:`PyBuffer_FromObject`. If the *base* object does not export
the writeable buffer protocol, then :exc:`TypeError` is raised.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *offset* and *size*. This
+ might require changes in your code for properly supporting 64-bit
+ systems.
+
.. cfunction:: PyObject* PyBuffer_FromMemory(void *ptr, Py_ssize_t size)
@@ -393,11 +403,19 @@ could be used to pass around structured data in its native, in-memory format.
:const:`Py_END_OF_BUFFER` may *not* be passed for the *size* parameter;
:exc:`ValueError` will be raised in that case.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *size*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: PyObject* PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size)
Similar to :cfunc:`PyBuffer_FromMemory`, but the returned buffer is writable.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *size*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: PyObject* PyBuffer_New(Py_ssize_t size)
@@ -405,3 +423,7 @@ could be used to pass around structured data in its native, in-memory format.
*size* bytes. :exc:`ValueError` is returned if *size* is not zero or positive.
Note that the memory buffer (as returned by :cfunc:`PyObject_AsWriteBuffer`) is
not specifically aligned.
+
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *size*. This might require
+ changes in your code for properly supporting 64-bit systems.