[issue3098] sys.sizeof test fails with wide unicode

Antoine Pitrou report at bugs.python.org
Fri Jun 13 21:56:47 CEST 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

Hmm, so it seems that in some UCS4 builds, sizeof(Py_UNICODE) could end
up being more than 4 if the native int type is itself larger than 32
bits; although the latter is probably quite rare (64-bit platforms are
usually either LP64 or LLP64).

However, Py_UNICODE.patch is wrong in that it uses Py_UNICODE_SIZE
rather than sizeof(Py_UNICODE). Py_UNICODE_SIZE itself is always either
2 or 4.

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


More information about the Python-bugs-list mailing list