[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

Ezio Melotti report at bugs.python.org
Thu Apr 14 13:32:05 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

The attached patch skips the peepholer optimizations for BINARY_SUBSCR if the resulting char is a surrogate on narrow builds or a non-bmp char in wide builds.
Note that this affects the optimization of lone surrogates on narrow builds too, but I think it's not worth to adding more complexity on the peepholer and check if they are part of a surrogate pair.
The patch still lacks comments and could have better tests.

----------
keywords: +needs review, patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file21660/issue5057.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5057>
_______________________________________


More information about the Python-bugs-list mailing list