[issue10542] Py_UNICODE_NEXT and other macros for surrogates

Alexander Belopolsky report at bugs.python.org
Wed Dec 29 02:25:44 CET 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Sat, Nov 27, 2010 at 5:03 PM, Marc-Andre Lemburg
<report at bugs.python.org> wrote:
..
>  * this version should be slightly faster and is also easier to read:
>
> #define Py_UCS4_READ_CODE_POINT(ptr, end) \
..
>      Py_UNICODE_JOIN_SURROGATES((ptr)++, (ptr)++) : \
..
>   I haven't tested it, but you get the idea.

I don't think C guarantees the order of evaluation of the operands in
bitwise expressions such as the expansion of the JOIN_SURROGATES
macro.

----------

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


More information about the Python-bugs-list mailing list