[Python-checkins] cpython (2.7): Closes #22580: Fix documentation of PyUnicode_Tailmatch()

victor.stinner python-checkins at python.org
Thu Oct 9 11:14:31 CEST 2014


https://hg.python.org/cpython/rev/de4ffe244440
changeset:   92890:de4ffe244440
branch:      2.7
parent:      92883:3f10b8009060
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Oct 09 11:14:04 2014 +0200
summary:
  Closes #22580: Fix documentation of PyUnicode_Tailmatch()

The result type is Py_ssize_t (and not int).

files:
  Doc/c-api/unicode.rst |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -1035,7 +1035,7 @@
    Unicode string.
 
 
-.. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end, int direction)
+.. c:function:: Py_ssize_t PyUnicode_Tailmatch(PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end, int direction)
 
    Return 1 if *substr* matches ``str[start:end]`` at the given tail end
    (*direction* == -1 means to do a prefix match, *direction* == 1 a suffix match),

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list