Martin von Löwis avatar Martin von Löwis committed d874867

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

Comments (0)

Files changed (2)

Doc/api/abstract.tex

   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
   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})}.
   \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
   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)
 ================================
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.