[Python-checkins] cpython: Disable unicode_resize() optimization on Windows (16-bit wchar_t)

victor.stinner python-checkins at python.org
Mon Oct 3 04:17:50 CEST 2011


http://hg.python.org/cpython/rev/26d63e7eac17
changeset:   72608:26d63e7eac17
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Mon Oct 03 04:18:04 2011 +0200
summary:
  Disable unicode_resize() optimization on Windows (16-bit wchar_t)

files:
  Objects/unicodeobject.c |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1185,6 +1185,10 @@
 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))

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list