Disable unicode_resize() optimization on Windows (16-bit wchar_t)

This commit is contained in:
Victor Stinner 2011-10-03 04:18:04 +02:00
parent 126c559d05
commit ca4f7a4298
1 changed files with 4 additions and 0 deletions

View File

@ -1185,6 +1185,10 @@ static int
unicode_resizable(PyObject *unicode)
{
Py_ssize_t len;
#if SIZEOF_WCHAR_T == 2
/* FIXME: unicode_resize() is buggy on Windows */
return 0;
#endif
if (Py_REFCNT(unicode) != 1)
return 0;
if (PyUnicode_CHECK_INTERNED(unicode))