[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

STINNER Victor report at bugs.python.org
Sat Oct 2 13:17:34 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

r85172 changes PyUnicode_AsWideCharString() (don't count the trailing nul character in the output size) and add unit tests.

r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size combinaisons (2/2, 2/4 and 4/2).

I noticed that PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() accept embeded nul characters. I don't know if it is a bug or an expected behaviour. Anyway, there is now a test for this case.

----------

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


More information about the Python-bugs-list mailing list