]> granicus.if.org Git - python/commitdiff
Disable unicode_resize() optimization on Windows (16-bit wchar_t)
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Oct 2011 02:18:04 +0000 (04:18 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Oct 2011 02:18:04 +0000 (04:18 +0200)
Objects/unicodeobject.c

index 9c02817b9da4ff8cc89912799f6fd2e54f24716c..68278e6040e79211ea187b56fd1ebd5798a9593c 100644 (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))