This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, python-dev, serhiy.storchaka, vstinner
Date 2013-04-03.00:06:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364947596.28.0.349997447957.issue16757@psf.upfronthosting.co.za>
In-reply-to
Content
> 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!
History
Date User Action Args
2013-04-03 00:06:36vstinnersetrecipients: + vstinner, ezio.melotti, python-dev, serhiy.storchaka
2013-04-03 00:06:36vstinnersetmessageid: <1364947596.28.0.349997447957.issue16757@psf.upfronthosting.co.za>
2013-04-03 00:06:36vstinnerlinkissue16757 messages
2013-04-03 00:06:36vstinnercreate