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.
diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst
index 5be46c4..cf1c790 100644
--- a/Doc/c-api/tuple.rst
+++ b/Doc/c-api/tuple.rst
@@ -42,6 +42,10 @@
Return a new tuple object of size *len*, or *NULL* on failure.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *len*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)
@@ -51,11 +55,19 @@
.. versionadded:: 2.4
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *n*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: Py_ssize_t PyTuple_Size(PyObject *p)
Take a pointer to a tuple object, and return the size of that tuple.
+ .. versionchanged:: 2.5
+ This function returned an :ctype:`int` type. This might require changes
+ in your code for properly supporting 64-bit systems.
+
.. cfunction:: Py_ssize_t PyTuple_GET_SIZE(PyObject *p)
@@ -68,6 +80,10 @@
Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is
out of bounds, return *NULL* and sets an :exc:`IndexError` exception.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *pos*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos)
@@ -79,6 +95,10 @@
Take a slice of the tuple pointed to by *p* from *low* to *high* and return it
as a new tuple.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *low* and *high*. This might
+ require changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o)
@@ -89,6 +109,10 @@
This function "steals" a reference to *o*.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *pos*. This might require
+ changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: void PyTuple_SET_ITEM(PyObject *p, Py_ssize_t pos, PyObject *o)
@@ -116,6 +140,10 @@
.. versionchanged:: 2.2
Removed unused third parameter, *last_is_sticky*.
+ .. versionchanged:: 2.5
+ This function used an :ctype:`int` type for *newsize*. This might
+ require changes in your code for properly supporting 64-bit systems.
+
.. cfunction:: int PyTuple_ClearFreeList(void)