[Python-ideas] Lack a API WCHAR* PyUnicode_WCHAR_DATA(PyObject *o), This is important for OS dependent feature port.

Victor Stinner victor.stinner at haypocalc.com
Tue Feb 21 00:34:59 CET 2012

It's not a lack, it's a design choice.

Unicode strings are no more stored as wchar_t* in Python 3.3, but as a
compact storage (1, 2 or 4 bytes per character). The conversion to
wchar_t* require a conversion in most cases (no conversion is needed
if the string already uses sizeof(wchar_t) bytes per character).

More information about the Python-ideas mailing list