Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
On Fri, Nov 26, 2010 at 7:45 PM, Eric Smith <rep...@bugs.python.org> wrote: .. > For my use I'd really need it to take the result of Py_UNICODE_NEXT. > Something like: > Py_ssize_t > Py_UNICODE_NUM_NEEDED(Py_UCS4 c) > and it would always return 1 or 2. Always 1 for a wide build, and for a narrow > build 1 if c is in the BMP else 2. Choose a better name, of course. Can you describe your use case in more detail? Would Py_UNICODE_PUT_NEXT() combined with Py_UNICODE_CODEPOINT_COUNT(Py_UNICODE *begin, Py_UNICODE *end) solve it? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10542> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com