From ca4f7a42986979ff938586aa6cca6c0aa208560e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 3 Oct 2011 04:18:04 +0200 Subject: Disable unicode_resize() optimization on Windows (16-bit wchar_t) --- Objects/unicodeobject.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9c02817..68278e6 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)) -- cgit v0.12