STINNER Victor added the comment: > It looks rather as a bug in C code. There is no need to return Py_ssize_t > instead of int.
Oh yes, you're right. A Py_ssize_t to return -1, 0 or 1 is overkill :-) But PyUnicode_Tailmatch() is now part of the stable ABI, the inefficient return type is not a bug import enough to break the ABI in Python 3.5. In Python 2.7, I see for example that the function is implemented with tailmatch() which returns an int, and PyUnicode_Tailmatch() casts it to Py_ssize_t. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22580> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com