From: Victor Stinner Date: Mon, 3 Oct 2011 02:18:04 +0000 (+0200) Subject: Disable unicode_resize() optimization on Windows (16-bit wchar_t) X-Git-Tag: v3.3.0a1~1374 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca4f7a42986979ff938586aa6cca6c0aa208560e;p=thirdparty%2FPython%2Fcpython.git Disable unicode_resize() optimization on Windows (16-bit wchar_t) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9c02817b9da4..68278e6040e7 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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))