[pypy-issue] [issue1127] [cpyext] PyUnicode_Tailmatch() misinterprets direction flag

Stefan Behnel tracker at bugs.pypy.org
Thu Apr 12 11:17:05 CEST 2012

New submission from Stefan Behnel <stefan_ml at behnel.de>:

The (not very straight forward) interpretation of the "direction" flag in
PyUnicode_Tailmatch() is that -1 denotes a prefix match and 1 a suffix match.
cpyext currently does it the other way round.


Untested patch (also for the test cases) is attached.

files: tailmatch.patch
messages: 4251
nosy: pypy-issue, sbehnel
priority: bug
status: unread
title: [cpyext] PyUnicode_Tailmatch() misinterprets direction flag

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list