summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-03-23 10:35:57 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-03-23 10:35:57 (GMT)
commitfe048e8ee77bac147bee87c0cddc3c8524d6b7a1 (patch)
tree4aa0fcaf35380c2c2e179b43de3cb981fb67b525
parent50d1d0bad5a6dc7136a6f95eb6763e5cc8162da7 (diff)
downloadcpython-fe048e8ee77bac147bee87c0cddc3c8524d6b7a1.zip
cpython-fe048e8ee77bac147bee87c0cddc3c8524d6b7a1.tar.gz
cpython-fe048e8ee77bac147bee87c0cddc3c8524d6b7a1.tar.bz2
Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
-rw-r--r--Doc/api/abstract.tex6
-rw-r--r--Misc/NEWS7
2 files changed, 10 insertions, 3 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex
index 1a498b9..5bd5a9a 100644
--- a/Doc/api/abstract.tex
+++ b/Doc/api/abstract.tex
@@ -810,7 +810,7 @@ determination.
the Python statement \samp{del \var{o}[\var{i1}:\var{i2}]}.
\end{cfuncdesc}
-\begin{cfuncdesc}{int}{PySequence_Count}{PyObject *o, PyObject *value}
+\begin{cfuncdesc}{Py_ssize_t}{PySequence_Count}{PyObject *o, PyObject *value}
Return the number of occurrences of \var{value} in \var{o}, that is,
return the number of keys for which \code{\var{o}[\var{key}] ==
\var{value}}. On failure, return \code{-1}. This is equivalent to
@@ -824,7 +824,7 @@ determination.
expression \samp{\var{value} in \var{o}}.
\end{cfuncdesc}
-\begin{cfuncdesc}{int}{PySequence_Index}{PyObject *o, PyObject *value}
+\begin{cfuncdesc}{Py_ssize_t}{PySequence_Index}{PyObject *o, PyObject *value}
Return the first index \var{i} for which \code{\var{o}[\var{i}] ==
\var{value}}. On error, return \code{-1}. This is equivalent to
the Python expression \samp{\var{o}.index(\var{value})}.
@@ -874,7 +874,7 @@ determination.
\versionadded{2.3}
\end{cfuncdesc}
-\begin{cfuncdesc}{int}{PySequence_Fast_GET_SIZE}{PyObject *o}
+\begin{cfuncdesc}{Py_ssize_t}{PySequence_Fast_GET_SIZE}{PyObject *o}
Returns the length of \var{o}, assuming that \var{o} was
returned by \cfunction{PySequence_Fast()} and that \var{o} is
not \NULL. The size can also be gotten by calling
diff --git a/Misc/NEWS b/Misc/NEWS
index ac53f85..7ba9dd2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -447,6 +447,13 @@ Windows
and _CRT_NONSTDC_NO_DEPRECATE.
+Documentation
+-------------
+
+- Patch #1686451: Fix return type for
+ PySequence_{Count,Index,Fast_GET_SIZE}.
+
+
What's New in Python 2.5 (final)
================================