Robert Schuppenies <[EMAIL PROTECTED]> added the comment: sys.maxunicode is well defined to be either 0xFFFF for UCS-2 or 0x10FFFF for UCS-4 (see PyUnicode_GetMax).
Py_UNICODE_SIZE is set in pyconfig.h to be either 2 or 4 during configuration. When >= 4, Py_UNICODE_WIDE is set which again influences sys.maxunicode. Thus, it currently is possible to derive Py_UNICODE_SIZE from sys.maxunicode. But it takes some indirections. So here are 2 possible patches, one which exposes Py_UNICODE_SIZE via _testcapi and one which assumes that sys.maxunicode reflects UCS-X settings. Since I am a fairly new Python developer and the new 4-eyes-per-commit policy for the beta phase, please decide which patch should be applied. Added file: http://bugs.python.org/file10624/Py_UNICODE.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3098> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com