Commit 2f401d71 authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.

Will backport.
parent eff49dce
...@@ -810,7 +810,7 @@ determination. ...@@ -810,7 +810,7 @@ determination.
the Python statement \samp{del \var{o}[\var{i1}:\var{i2}]}. the Python statement \samp{del \var{o}[\var{i1}:\var{i2}]}.
\end{cfuncdesc} \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 occurrences of \var{value} in \var{o}, that is,
return the number of keys for which \code{\var{o}[\var{key}] == return the number of keys for which \code{\var{o}[\var{key}] ==
\var{value}}. On failure, return \code{-1}. This is equivalent to \var{value}}. On failure, return \code{-1}. This is equivalent to
...@@ -824,7 +824,7 @@ determination. ...@@ -824,7 +824,7 @@ determination.
expression \samp{\var{value} in \var{o}}. expression \samp{\var{value} in \var{o}}.
\end{cfuncdesc} \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}] == Return the first index \var{i} for which \code{\var{o}[\var{i}] ==
\var{value}}. On error, return \code{-1}. This is equivalent to \var{value}}. On error, return \code{-1}. This is equivalent to
the Python expression \samp{\var{o}.index(\var{value})}. the Python expression \samp{\var{o}.index(\var{value})}.
...@@ -874,7 +874,7 @@ determination. ...@@ -874,7 +874,7 @@ determination.
\versionadded{2.3} \versionadded{2.3}
\end{cfuncdesc} \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 Returns the length of \var{o}, assuming that \var{o} was
returned by \cfunction{PySequence_Fast()} and that \var{o} is returned by \cfunction{PySequence_Fast()} and that \var{o} is
not \NULL. The size can also be gotten by calling not \NULL. The size can also be gotten by calling
......
...@@ -711,6 +711,9 @@ Tools ...@@ -711,6 +711,9 @@ Tools
Documentation Documentation
------------- -------------
- Patch #1686451: Fix return type for
PySequence_{Count,Index,Fast_GET_SIZE}.
- Patch #1679379: add documentation for fnmatch.translate(). - Patch #1679379: add documentation for fnmatch.translate().
- Bug #1629566: clarify the docs on the return values of parsedate() - Bug #1629566: clarify the docs on the return values of parsedate()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment