STINNER Victor added the comment: > New changeset 7132bca093ad by Victor Stinner in branch 'default': > Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function
This changeset is almost the same than unicode_findmaxchar_2.patch. I prefered to keep the API unchanged and not call _PyUnicode_FindMaxChar() instead of adding a test in the function to exit it. There is just a minor difference in Python/formatter_unicode.c: the test for _PyUnicode_FindMaxChar() is done after the test on format->fill_char (which should avoid a call to for _PyUnicode_FindMaxChar() if fill_char is wider than the actual buffer). Thanks Serhiy for your great idea! ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com